]> err.no Git - util-linux/commitdiff
Merge remote branch 'origin/master'
authorLaMont Jones <lamont@debian.org>
Sun, 11 Oct 2009 00:48:57 +0000 (18:48 -0600)
committerLaMont Jones <lamont@debian.org>
Sun, 11 Oct 2009 00:48:57 +0000 (18:48 -0600)
1  2 
hwclock/hwclock.c
login-utils/agetty.c
mount/Makefile.am
mount/mount.c
sys-utils/ipcs.c

Simple merge
Simple merge
Simple merge
diff --cc mount/mount.c
index fdd56894ebe57461d1fb31e3736c3ca2acced8e1,23d70cb14ce7a46d0c160150a973a38bd8c1099d..4867f465bf1be40d94d61b9052b7ac1b4afeec1b
@@@ -2225,17 -2205,20 +2225,23 @@@ main(int argc, char *argv[]) 
                if (((uid_t)0 == ruid) && (ruid == euid)) {
                        restricted = 0;
                }
-       }
  
-       if (restricted &&
-           (types || options || readwrite || nomtab || mount_all ||
-            fake || mounttype || (argc + specseen) != 1)) {
-               die (EX_USAGE, _("mount: only root can do that"));
+               if (restricted &&
+                   (types || options || readwrite || nomtab || mount_all ||
+                    fake || mounttype || (argc + specseen) != 1)) {
+                       if (ruid == 0 && euid != 0)
+                               /* user is root, but setuid to non-root */
+                               die (EX_USAGE, _("mount: only root can do that "
+                                       "(effective UID is %d)"), euid);
+                       die (EX_USAGE, _("mount: only root can do that"));
+               }
        }
  
 +      if (keysize && sscanf(keysize,"%d",&keysz) != 1)
 +              die (EX_USAGE, _("mount: argument to --keybits or -k must be a number"));
 +
        atexit(unlock_mtab);
  
        switch (argc+specseen) {
Simple merge