aboutsummaryrefslogtreecommitdiff
path: root/security/cyrus-sasl2/files/patch-lib::common.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/cyrus-sasl2/files/patch-lib::common.c')
-rw-r--r--security/cyrus-sasl2/files/patch-lib::common.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/security/cyrus-sasl2/files/patch-lib::common.c b/security/cyrus-sasl2/files/patch-lib::common.c
new file mode 100644
index 000000000000..76b66e7b5e86
--- /dev/null
+++ b/security/cyrus-sasl2/files/patch-lib::common.c
@@ -0,0 +1,16 @@
+Index: lib/common.c
+diff -u -p lib/common.c.orig lib/common.c
+--- lib/common.c.orig Wed Jul 7 01:03:05 2004
++++ lib/common.c Sat Oct 9 02:03:02 2004
+@@ -1838,7 +1838,10 @@ _sasl_getpath(void *context __attribute_
+ if (! path)
+ return SASL_BADPARAM;
+
+- *path = getenv(SASL_PATH_ENV_VAR);
++ /* Honor external variable only in a safe environment */
++ if (getuid() == geteuid() && getgid() == getegid())
++ *path = getenv(SASL_PATH_ENV_VAR);
++
+ if (! *path)
+ *path = PLUGINDIR;
+