OSDN Git Service

su.c: disable permission checking eclair-x86
authorChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 29 Oct 2009 03:11:19 +0000 (11:11 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 14 Apr 2010 10:55:14 +0000 (18:55 +0800)
su/su.c

diff --git a/su/su.c b/su/su.c
index b87cece..cf327b3 100644 (file)
--- a/su/su.c
+++ b/su/su.c
@@ -56,14 +56,14 @@ int main(int argc, char **argv)
             gid = pw->pw_gid;
         }
     }
-
+#if 0
     /* Until we have something better, only root and the shell can use su. */
     myuid = getuid();
     if (myuid != AID_ROOT && myuid != AID_SHELL) {
         fprintf(stderr,"su: uid %d not allowed to su\n", myuid);
         return 1;
     }
-    
+#endif
     if(setgid(gid) || setuid(uid)) {
         fprintf(stderr,"su: permission denied\n");
         return 1;