Debian : nejde se prihlasit jako root na Cups

Petr Stetiar ynezz na true.cz
Čtvrtek Červen 14 09:39:21 CEST 2007


Lubomír Vogl <Vogl.Lubomir na seznam.cz> [2007-06-14 09:11:10]:

> cupsdCallPamAuthHelper: execle() failed: Permission denied
> cupsdCallPamAuthHelper: authentication helper returned with 2
> cupsdAuthorize: PAM authentication helper failed with code 2
> cupsdAuthorize: pam_authenticate() returned 7 (Authentication failure)!

Podle me tam maji chybu. Pri tom execle() nekontroluji jeho navratovou
hodnotu a vraceji pokazde chybu.

cupsys-1.2.11/debian/patches/10_external_pam_helper.dpatch, radek 90:

+  if (!pid) {
+    char * const envp[] = { NULL };
+
+    /* child: route inp[1] to stdin and execute pam helper */
+    close (inp[1]);
+    dup2 (inp[0], 0);
+    execle (authhelper, authhelper, NULL, envp);
+    cupsdLogMessage(CUPSD_LOG_ERROR,
+           "cupsdCallPamAuthHelper: execle() failed: %s\n", strerror(errno));
+    return 2;
+  }

A takhle nejak by to melo byt:

+  if (!pid) {
+    int ret = -1;
+    char * const envp[] = { NULL };
+
+    /* child: route inp[1] to stdin and execute pam helper */
+    close (inp[1]);
+    dup2 (inp[0], 0);
+    ret = execle (authhelper, authhelper, NULL, envp);
+    if (ret == -1) {
+        cupsdLogMessage(CUPSD_LOG_ERROR,
+               "cupsdCallPamAuthHelper: execle() failed: %s\n", strerror(errno));
+        return 2;
+    }
+  }

-- ynezz



Další informace o konferenci Linux