[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compile error in current CVS, src/server.c:5500
From: |
Brian Murphy |
Subject: |
Re: Compile error in current CVS, src/server.c:5500 |
Date: |
Mon, 21 Jul 2003 21:26:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529 |
Derek Robert Price wrote:
What exactly is the "error 0" you cite? I'd rather CVS not start
outputting arbitrary error numbers without good reason. Also, if
pam_strerror is called on the output of pam_end, I don't think
printing the actual error number matters much. It shouldn't matter to
an end user and likely not even to us with a good text message. Then
again, and please feel free to correct me on this one, maybe we should
leave the error number in there through the experimental stage, until
we discover that the text messages in error reports are satisfying?
From the linux source the only other code returned from pam_end other
than PAM_SUCCESS is PAM_SYSTEM_ERR which gives the message "System
error" which doesn't explain a lot.
Derek
Here is a patch fixing the nesting problem.
/Brian
Index: src/server.c
===================================================================
RCS file: /cvs/ccvs/src/server.c,v
retrieving revision 1.301
diff -u -r1.301 server.c
--- src/server.c 20 Jul 2003 16:38:55 -0000 1.301
+++ src/server.c 21 Jul 2003 18:54:54 -0000
@@ -5483,7 +5483,7 @@
char *username, *password;
{
pam_handle_t *pamh = NULL;
- int retval;
+ int retval, err;
struct cvs_pam_userinfo ui = { username, password };
struct pam_conv conv = { cvs_pam_conv, (void *)&ui };
@@ -5491,14 +5491,19 @@
if (retval == PAM_SUCCESS)
retval = pam_authenticate(pamh, 0);
+ else
+ printf("E PAM Error: %s\n", pam_strerror(NULL, retval));
if (retval == PAM_SUCCESS)
retval = pam_acct_mgmt(pamh, 0);
+ else
+ printf("E PAM Error: %s\n", pam_strerror(pamh, retval));
- if (pam_end(pamh,retval) != PAM_SUCCESS)
+ if ((err = pam_end(pamh, retval)) != PAM_SUCCESS)
{
- printf("E Fatal error, aborting.\n
- pam failed to release authenticator\n");
+ printf("E Fatal error, aborting.\n\
+error 0 pam failed to release authenticator\n\
+PAM error number %d: %s\n", err, pam_strerror(NULL, err));
error_exit ();
}
- Re: Compile error in current CVS, src/server.c:5500, (continued)
Re: Compile error in current CVS, src/server.c:5500, Brian Murphy, 2003/07/21
- Re: Compile error in current CVS, src/server.c:5500, Mark D. Baushke, 2003/07/21
- Re: Compile error in current CVS, src/server.c:5500, Derek Robert Price, 2003/07/21
- Re: Compile error in current CVS, src/server.c:5500, Brian Murphy, 2003/07/21
- Re: Compile error in current CVS, src/server.c:5500, Derek Robert Price, 2003/07/21
- Re: Compile error in current CVS, src/server.c:5500, Brian Murphy, 2003/07/21
- Re: Compile error in current CVS, src/server.c:5500, Derek Robert Price, 2003/07/21
Re: Compile error in current CVS, src/server.c:5500,
Brian Murphy <=
Re: Compile error in current CVS, src/server.c:5500, Derek Robert Price, 2003/07/21
Re: Compile error in current CVS, src/server.c:5500, Brian Murphy, 2003/07/21
Re: Compile error in current CVS, src/server.c:5500, Brian Murphy, 2003/07/23
Re: Compile error in current CVS, src/server.c:5500, Derek Robert Price, 2003/07/23
Re: Compile error in current CVS, src/server.c:5500, Brian Murphy, 2003/07/24
Re: Compile error in current CVS, src/server.c:5500, Mark D. Baushke, 2003/07/24
Re: Compile error in current CVS, src/server.c:5500, Derek Robert Price, 2003/07/25