rpms/at/devel at-3.1.8-pam_delete_cred.patch, NONE, 1.1 at.spec, 1.28, 1.29

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Apr 8 17:01:07 UTC 2005


Update of /cvs/dist/rpms/at/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv32607

Modified Files:
	at.spec 
Added Files:
	at-3.1.8-pam_delete_cred.patch 
Log Message:
always delete credentials before pam_close_session

at-3.1.8-pam_delete_cred.patch:
 atd.c  |   17 +++++++++--------
 perm.c |    2 +-
 2 files changed, 10 insertions(+), 9 deletions(-)

--- NEW FILE at-3.1.8-pam_delete_cred.patch ---
--- at-3.1.8/atd.c.pam_delete_cred	2005-04-08 12:36:33.137550000 -0400
+++ at-3.1.8/atd.c	2005-04-08 12:44:01.504734000 -0400
@@ -588,7 +588,8 @@
     }
 
 #ifdef  WITH_PAM
-    pam_close_session(pamh, PAM_SILENT);
+    pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT );
+    pam_close_session(pamh, PAM_SILENT);    
     pam_end(pamh, PAM_ABORT);
     closelog();
     openlog("atd", LOG_PID, LOG_ATD);
@@ -700,14 +701,14 @@
 	{
 	    /* Parent */
 	    waitpid(mail_pid, (int *) NULL, 0);
-	    
+	}    
 #ifdef WITH_PAM
-	    pam_close_session(pamh, PAM_SILENT);
-	    pam_end(pamh, PAM_ABORT);
-	    closelog();
-	    openlog("atd", LOG_PID, LOG_ATD);
-#endif
-	}
+	pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT );
+	pam_close_session(pamh, PAM_SILENT);
+	pam_end(pamh, PAM_ABORT);
+	closelog();
+	openlog("atd", LOG_PID, LOG_ATD);
+#endif	
     }
 #endif
     exit(EXIT_SUCCESS);
--- at-3.1.8/perm.c.pam_delete_cred	2005-04-08 12:36:33.150537000 -0400
+++ at-3.1.8/perm.c	2005-04-08 12:56:13.561944000 -0400
@@ -156,7 +156,7 @@
   PAM_FAIL_CHECK;
   retcode = pam_setcred(pamh, PAM_ESTABLISH_CRED | PAM_SILENT);
   PAM_FAIL_CHECK;
-
+  pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT );
   pam_close_session(pamh,PAM_SILENT);
   pam_end(pamh, PAM_ABORT);
 


Index: at.spec
===================================================================
RCS file: /cvs/dist/rpms/at/devel/at.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- at.spec	6 Apr 2005 18:19:11 -0000	1.28
+++ at.spec	8 Apr 2005 17:00:46 -0000	1.29
@@ -7,7 +7,7 @@
 Summary: Job spooling tools.
 Name: at
 Version: 3.1.8
-Release: 74_FC4
+Release: 77_FC4
 License: GPL
 Group: System Environment/Daemons
 Source: http://ftp.debian.org/debian/pool/main/a/at/at_3.1.8-11.tar.gz
@@ -37,6 +37,7 @@
 Patch27: at-3.1.8-pam.patch
 Patch28: at-3.1.8-pam_perms.patch
 Patch29: at-3.1.8-pam_fail_close_session.patch
+Patch30: at-3.1.8-pam_delete_cred.patch
 
 Prereq: fileutils chkconfig /etc/init.d
 BuildPrereq: flex bison autoconf
@@ -103,6 +104,7 @@
 %patch27 -p1 -b .pam
 %patch28 -p1 -b .pam_perms
 %patch29 -p1 -b .pam_fail_close_session
+%patch30 -p1 -b .pam_delete_cred
 
 %build
 # patch10 touches configure.in
@@ -190,6 +192,10 @@
 %attr(4755,root,root)	%{_bindir}/at
 
 %changelog
+* Fri Apr 08 2005 Jason Vas Dias <jvdias at redhat.com> 3.1.8-77
+- always call pam_setcred(pamh, PAM_DELETE_CRED) before session 
+- close
+
 * Tue Apr 05 2005 Jason Vas Dias <jvdias at redhat.com> 3.1.8-70
 - always call pam_close_session on PAM_FAIL or pam_end
 




More information about the fedora-cvs-commits mailing list