uwrap: Fix unsetting the the envname of initial XIDs
authorAndreas Schneider <asn@samba.org>
Mon, 15 Jul 2019 11:58:44 +0000 (13:58 +0200)
committerAndreas Schneider <asn@samba.org>
Mon, 15 Jul 2019 14:16:06 +0000 (16:16 +0200)
This issue got introduced by:
1c793e19f1cb8cb33defb171c9ae719ec8a820da

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
src/uid_wrapper.c

index 84c3ca5b2e450a851192cdd0db7cc9475006cfac..6e4a6da2f0d7a2335dd93eafc78e8397f758ef14 100644 (file)
@@ -1009,12 +1009,12 @@ static unsigned long uwrap_get_xid_from_env(const char *envname)
        }
 
        if (env[0] == '\0') {
-               unsetenv("UID_WRAPPER_INITIAL_RUID");
+               unsetenv(envname);
                return ULONG_MAX;
        }
 
        xid = strtoul(env, &endp, 10);
-       unsetenv("UID_WRAPPER_INITIAL_RUID");
+       unsetenv(envname);
        if (env == endp) {
                return ULONG_MAX;
        }