]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/acl/ldap_config.c
LDAP config string values must be strdup'ed
[netatalk.git] / libatalk / acl / ldap_config.c
index 6cf554a8fec1921c9239092e0c45f78150d041ba..bd9d414b85758ce8439863100e9752f33b0785af 100644 (file)
@@ -48,7 +48,7 @@ int acl_ldap_readconfig(dictionary *iniconfig)
                     *((int *)(ldap_prefs[i].pref)) = atoi(val);
                 else
                     /* store string as string */
-                    *((const char **)(ldap_prefs[i].pref)) = val;
+                    *((const char **)(ldap_prefs[i].pref)) = strdup(val);
             } else {
                 /* ok, we have string to int mapping for this pref
                    eg. "none", "simple", "sasl" map to 0, 128, 129 */