OSDN Git Service

am dffa1806: pppd: Remove the UID check to allow running as a non-root user.
authorChia-chi Yeh <chiachi@android.com>
Thu, 2 Jul 2009 21:24:59 +0000 (14:24 -0700)
committerThe Android Open Source Project <initial-contribution@android.com>
Thu, 2 Jul 2009 21:24:59 +0000 (14:24 -0700)
Merge commit 'dffa18062629fab18e536d21fe5f8b8f07c7e991'

* commit 'dffa18062629fab18e536d21fe5f8b8f07c7e991':
  pppd: Remove the UID check to allow running as a non-root user.

pppd/main.c

index efcc0e2..adb57f1 100644 (file)
@@ -364,6 +364,7 @@ main(argc, argv)
     {
         extern void pppox_init();
         pppox_init();
+        privileged = 1;
     }
 #endif
 
@@ -398,6 +399,7 @@ main(argc, argv)
     if (debug)
        setlogmask(LOG_UPTO(LOG_DEBUG));
 
+#ifndef ANDROID_CHANGES
     /*
      * Check that we are running as root.
      */
@@ -406,6 +408,7 @@ main(argc, argv)
                     argv[0]);
        exit(EXIT_NOT_ROOT);
     }
+#endif
 
     if (!ppp_available()) {
        option_error("%s", no_ppp_msg);