uwrap: Rename the variable to get myuid from geteuid().
authorAndreas Schneider <asn@cryptomilk.org>
Tue, 7 Jan 2014 12:31:58 +0000 (13:31 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 7 Jan 2014 12:31:58 +0000 (13:31 +0100)
README
src/uid_wrapper.c

diff --git a/README b/README
index 9aa508b660d8e4cd4afaaf92705914f55a5c9087..aac2285e84d5cef80570e10f58195ca9304b28f8 100644 (file)
--- a/README
+++ b/README
@@ -16,5 +16,5 @@ loaded. If you need the application to think it is root at startup you can set:
 
 UID_WRAPPER_ROOT=1
 
-If you set the environment variable to UID_WRAPPER_ROOT=2 before you call
+If you set the environment variable to UID_WRAPPER_MYUID=1 before you call
 geteuid() then it will return the real uid.
index d808f3b9523c29a3c86a02d36f60cd7883de9283..d2cb6180344df08149b4ae0f7a6e6cb9246fbe5c 100644 (file)
@@ -697,7 +697,7 @@ uid_t getuid(void)
  */
 static uid_t uwrap_geteuid(void)
 {
-       const char *env = getenv("UID_WRAPPER_ROOT");
+       const char *env = getenv("UID_WRAPPER_MYUID");
        struct uwrap_thread *id = uwrap_tls_id;
        uid_t uid;
 
@@ -706,7 +706,7 @@ static uid_t uwrap_geteuid(void)
        pthread_mutex_unlock(&uwrap_id_mutex);
 
        /* Disable root and return myuid */
-       if (env != NULL && env[0] == '2') {
+       if (env != NULL && env[0] == '1') {
                uid = uwrap.myuid;
        }