]> git.pld-linux.org Git - packages/util-linux.git/commitdiff
fix for pam and logbtmp()
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 2 May 2001 17:13:17 +0000 (17:13 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    util-linux-pam.patch -> 1.1

util-linux-pam.patch [new file with mode: 0644]

diff --git a/util-linux-pam.patch b/util-linux-pam.patch
new file mode 100644 (file)
index 0000000..43359c4
--- /dev/null
@@ -0,0 +1,26 @@
+diff -urN util-linux-2.11b.org/login-utils/login.c util-linux-2.11b/login-utils/login.c
+--- util-linux-2.11b.org/login-utils/login.c   Wed May  2 19:09:39 2001
++++ util-linux-2.11b/login-utils/login.c       Wed May  2 19:06:08 2001
+@@ -312,6 +312,9 @@
+       memset(&ut, 0, sizeof(ut));
++      if (!username)
++          username = "unknown";
++
+       strncpy(ut.ut_user, username, sizeof(ut.ut_user));
+       strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id));
+@@ -576,6 +579,12 @@
+     if(passwd_req == 1) {
+       int failcount=0;
++      
++      /* if we didn't get a user on the command line,
++         set it to NULL */
++      pam_get_item(pamh, PAM_USER, (const void **) &username);
++      if (!username || username[0] == '\0')
++          pam_set_item(pamh, PAM_USER, NULL);   
+       /* there may be better ways to deal with some of these
+          conditions, but at least this way I don't think we'll
This page took 0.112068 seconds and 4 git commands to generate.