Updated for upstream version 4.1.2.

This commit is contained in:
nekral-guest
2008-09-13 17:04:57 +00:00
parent 22a26e92e4
commit 30c5ceb601
2 changed files with 6 additions and 5 deletions
+3
View File
@@ -1,6 +1,9 @@
shadow (1:4.1.2-1) experimental; urgency=low
* The "" release.
* New upstream release:
- Updated patches:
+ debian/patches/431_su_uid_0_not_root
* debian/control: changed the "Replaces" on manpages-zh to a versioned
one on 1.5.1-1
* debian/control: drop all Replaces on manpages-* when the version is
+3 -5
View File
@@ -10,19 +10,17 @@ Index: shadow-4.1.0/src/su.c
===================================================================
--- shadow-4.1.0.orig/src/su.c
+++ shadow-4.1.0/src/su.c
@@ -449,7 +449,14 @@
@@ -449,7 +449,12 @@
optind++;
}
if (!name[0]) /* use default user ID */
if ('\0' == name[0]) { /* use default user ID */
- (void) strcpy (name, "root");
+ {
+ struct passwd *root_pw = getpwuid(0);
+ if (root_pw == NULL) {
+ SYSLOG((LOG_CRIT, "There is no UID 0 user."));
+ su_failure(tty);
+ }
+ strcpy(name, root_pw->pw_name);
+ }
}
doshell = argc == optind; /* any arguments remaining? */
if (command)