rpms/pam/devel pam-0.79-cleanup-redhat.patch, 1.3, 1.4 pam.spec, 1.77, 1.78

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Jun 9 21:28:55 UTC 2005


Author: tmraz

Update of /cvs/dist/rpms/pam/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv472

Modified Files:
	pam-0.79-cleanup-redhat.patch pam.spec 
Log Message:
- pam_loginuid shouldn't report error when /proc/self/loginuid
  is missing (#159974)


pam-0.79-cleanup-redhat.patch:
 pam_console/pam_console.c     |    1 +
 pam_loginuid/pam_loginuid.8   |    2 --
 pam_loginuid/pam_loginuid.c   |   14 ++++++++------
 pam_timestamp/pam_timestamp.c |    2 ++
 4 files changed, 11 insertions(+), 8 deletions(-)

Index: pam-0.79-cleanup-redhat.patch
===================================================================
RCS file: /cvs/dist/rpms/pam/devel/pam-0.79-cleanup-redhat.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- pam-0.79-cleanup-redhat.patch	20 May 2005 15:53:01 -0000	1.3
+++ pam-0.79-cleanup-redhat.patch	9 Jun 2005 21:28:52 -0000	1.4
@@ -8,23 +8,33 @@
  		err = PAM_SESSION_ERR; goto return_error;
  	    }
  	    consoleuser = _do_malloc(st.st_size+1);
---- Linux-PAM-0.79/modules/pam_loginuid/pam_loginuid.c.rhcleanup	2005-03-31 18:39:58.000000000 +0200
-+++ Linux-PAM-0.79/modules/pam_loginuid/pam_loginuid.c	2005-05-19 21:00:15.059962731 +0200
-@@ -56,13 +56,10 @@
+--- Linux-PAM-0.79/modules/pam_loginuid/pam_loginuid.c.rhcleanup        2005-03-31 18:39:58.000000000 +0200
++++ Linux-PAM-0.79/modules/pam_loginuid/pam_loginuid.c  2005-06-09 23:23:53.000000000 +0200
+@@ -56,16 +56,18 @@
  static int set_loginuid(uid_t uid)
  {
- 	int fd, count, rc = 0;
--	char fn[PATH_MAX];
- 	char loginuid[16];
- 
--	memset(loginuid, 0, sizeof(loginuid));
- 	count = snprintf(loginuid, sizeof(loginuid), "%d", uid);
--	snprintf(fn, sizeof(fn), "/proc/%d/loginuid", getpid());
--	fd = open(fn, O_NOFOLLOW|O_WRONLY|O_TRUNC);
-+	fd = open("/proc/self/loginuid", O_NOFOLLOW|O_WRONLY|O_TRUNC);
- 	if (fd < 0) {
- 		_pam_log(LOG_ERR, "set_loginuid failed opening loginuid\n");
- 		return 1;
+        int fd, count, rc = 0;
+-       char fn[PATH_MAX];
+        char loginuid[16];
+
+-       memset(loginuid, 0, sizeof(loginuid));
+        count = snprintf(loginuid, sizeof(loginuid), "%d", uid);
+-       snprintf(fn, sizeof(fn), "/proc/%d/loginuid", getpid());
+-       fd = open(fn, O_NOFOLLOW|O_WRONLY|O_TRUNC);
++       fd = open("/proc/self/loginuid", O_NOFOLLOW|O_WRONLY|O_TRUNC);
+        if (fd < 0) {
+-               _pam_log(LOG_ERR, "set_loginuid failed opening loginuid\n");
+-               return 1;
++               int loglevel = LOG_DEBUG;
++               if (errno != ENOENT) {
++                       rc = 1;
++                       loglevel = LOG_ERR;
++               }
++               _pam_log(loglevel, "set_loginuid failed opening loginuid\n");
++               return rc;
+        }
+        if (_pammodutil_write(fd, loginuid, count) != count)
+                rc = 1;
 --- Linux-PAM-0.79/modules/pam_loginuid/pam_loginuid.8.rhcleanup	2005-03-31 18:39:58.000000000 +0200
 +++ Linux-PAM-0.79/modules/pam_loginuid/pam_loginuid.8	2005-05-19 20:59:49.456022913 +0200
 @@ -15,8 +15,6 @@


Index: pam.spec
===================================================================
RCS file: /cvs/dist/rpms/pam/devel/pam.spec,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- pam.spec	9 Jun 2005 11:47:18 -0000	1.77
+++ pam.spec	9 Jun 2005 21:28:52 -0000	1.78
@@ -12,7 +12,7 @@
 Summary: A security tool which provides authentication for applications.
 Name: pam
 Version: 0.79
-Release: 9
+Release: 10
 License: GPL or BSD
 Group: System Environment/Base
 Source0: ftp.us.kernel.org:/pub/linux/libs/pam/pre/library/Linux-PAM-%{version}.tar.bz2
@@ -373,8 +373,10 @@
 %{_libdir}/libpam_misc.so
 
 %changelog
-* Thu Jun  9 2005 Tomas Mraz <tmraz at redhat.com>
+* Thu Jun  9 2005 Tomas Mraz <tmraz at redhat.com> 0.79-10
 - add the Requires dependency on audit-libs (#159885)
+- pam_loginuid shouldn't report error when /proc/self/loginuid
+  is missing (#159974)
 
 * Fri May 20 2005 Tomas Mraz <tmraz at redhat.com> 0.79-9
 - update the pam audit patch to support newest audit library,




More information about the fedora-cvs-commits mailing list