Updated for upstream version 4.1.2.
This commit is contained in:
Vendored
+3
@@ -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
|
||||
|
||||
Vendored
+3
-5
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user