blob: 8de08cfc3b26b9f9699a73cb6d206ab7ef64ad0b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
Index: lib/common.c
diff -u lib/common.c.orig lib/common.c
--- lib/common.c.orig Mon Nov 15 18:23:04 2004
+++ lib/common.c Mon Nov 15 18:24:43 2004
@@ -684,7 +684,13 @@
if (! path_dest)
return SASL_BADPARAM;
- path = getenv(SASL_PATH_ENV_VAR);
+
+ path = NULL;
+
+ /* Honor external variable only in a safe environment */
+ if (getuid() == geteuid() && getgid() == getegid())
+ path = getenv(SASL_PATH_ENV_VAR);
+
if (! path)
path = PLUGINDIR;
return _sasl_strdup(path, path_dest, NULL);
|