]> git.pld-linux.org Git - packages/util-linux.git/blame - util-linux-pam.patch
- adapterized (avoid macros with /usr/include/{ncurses,freetype}*)
[packages/util-linux.git] / util-linux-pam.patch
CommitLineData
9cb024c1
AM
1diff -urN util-linux-2.11b.org/login-utils/login.c util-linux-2.11b/login-utils/login.c
2--- util-linux-2.11b.org/login-utils/login.c Wed May 2 19:09:39 2001
3+++ util-linux-2.11b/login-utils/login.c Wed May 2 19:06:08 2001
4@@ -312,6 +312,9 @@
5
6 memset(&ut, 0, sizeof(ut));
7
8+ if (!username)
9+ username = "unknown";
10+
11 strncpy(ut.ut_user, username, sizeof(ut.ut_user));
12
13 strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id));
14@@ -576,6 +579,12 @@
15
16 if(passwd_req == 1) {
17 int failcount=0;
18+
19+ /* if we didn't get a user on the command line,
20+ set it to NULL */
21+ pam_get_item(pamh, PAM_USER, (const void **) &username);
22+ if (!username || username[0] == '\0')
23+ pam_set_item(pamh, PAM_USER, NULL);
24
25 /* there may be better ways to deal with some of these
26 conditions, but at least this way I don't think we'll
This page took 0.059903 seconds and 4 git commands to generate.