Bug Report: Samba 2.0.7 and PAM credentials

Onime Clement onime at ictp.trieste.it
Thu Jun 8 09:24:09 GMT 2000


I recently had some difficulties with Samba 2.0.7 and AFS..

The stock version 2.0.7 was compiled with support for PAM. 
This allowed authentication via the AFS PAM library but the access rights
were not being granted.

The problem was solved by adding the following bit of code to the file 
passdb/pass_check.c to enable setting the PAM credentials. 


--- passdb/pass_check.c.orig	Wed May 31 00:28:44 2000
+++ passdb/pass_check.c	Wed Jun  7 14:33:44 2000
@@ -129,4 +129,13 @@
   pam_error = pam_acct_mgmt(pamh, PAM_SILENT);
   PAM_BAIL;
+	/* Now set the session credentials...
+	*/
+#ifdef PAM_ESTABLISH_CRED
+	pam_error = pam_setcred(pamh, PAM_ESTABLISH_CRED);
+#else
+	pam_error = pam_setcred(pamh, PAM_CRED_ESTABLISH);
+#endif
+	PAM_BAIL;
+
   pam_end(pamh, PAM_SUCCESS);
   /* If this point is reached, the user has been authenticated. */


Thanks
Clement Onime




More information about the samba-technical mailing list