summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobin Hack <hack.robin@gmail.com>2015-01-23 15:15:42 +0100
committerAndreas Schneider <asn@cryptomilk.org>2015-01-28 17:17:07 +0100
commitbda49a3af43b6dd3447422121f78709397234109 (patch)
tree450b1ca7fb29f224ba19f458e430d009585b0cd0 /lib
parent0830d93eece7e0d132c1513c195d7735cf3421da (diff)
downloadsamba-bda49a3af43b6dd3447422121f78709397234109.tar.gz
uwrap: Small optimalization of uwrap_init().
Don't call getenv("UID_WRAPPER") on start of uwrap_init(). Signed-off-by: Robin Hack <hack.robin@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/uid_wrapper/uid_wrapper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/uid_wrapper/uid_wrapper.c b/lib/uid_wrapper/uid_wrapper.c
index aa3f30212a8..187cc113862 100644
--- a/lib/uid_wrapper/uid_wrapper.c
+++ b/lib/uid_wrapper/uid_wrapper.c
@@ -572,7 +572,7 @@ static void uwrap_thread_child(void)
static void uwrap_init(void)
{
- const char *env = getenv("UID_WRAPPER");
+ const char *env;
pthread_t tid = pthread_self();
UWRAP_LOCK(uwrap_id);
@@ -607,6 +607,7 @@ static void uwrap_init(void)
uwrap.initialised = true;
uwrap.enabled = false;
+ env = getenv("UID_WRAPPER");
if (env != NULL && env[0] == '1') {
const char *root = getenv("UID_WRAPPER_ROOT");
int rc;