gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r1677 - GNUnet/src/util


From: grothoff
Subject: [GNUnet-SVN] r1677 - GNUnet/src/util
Date: Sun, 14 Aug 2005 20:58:55 -0700 (PDT)

Author: grothoff
Date: 2005-08-14 20:58:54 -0700 (Sun, 14 Aug 2005)
New Revision: 1677

Modified:
   GNUnet/src/util/osconfig.c
Log:
mantis 853 -- insufficient to test for access, need to be root, too

Modified: GNUnet/src/util/osconfig.c
===================================================================
--- GNUnet/src/util/osconfig.c  2005-08-15 03:53:30 UTC (rev 1676)
+++ GNUnet/src/util/osconfig.c  2005-08-15 03:58:54 UTC (rev 1677)
@@ -287,7 +287,7 @@
 #endif
 #ifdef LINUX
        if (ACCESS("/usr/sbin/adduser", X_OK) == 0)
-               return 1;
+         return (geteuid() == 0);
        else
                /* TODO: useradd */
 #endif
@@ -302,7 +302,7 @@
 int isOSGroupAddCapable() {
 #ifdef LINUX
        if (ACCESS("/usr/sbin/addgroup", X_OK) == 0) {
-               return 1;
+         return (geteuid() == 0);
        }
        /* TODO: groupadd */
        else





reply via email to

[Prev in Thread] Current Thread [Next in Thread]