]> arthur.barton.de Git - netatalk.git/commitdiff
LDAP config string values must be strdup'ed
authorFrank Lahm <franklahm@googlemail.com>
Tue, 6 Mar 2012 15:58:06 +0000 (16:58 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Tue, 6 Mar 2012 15:58:06 +0000 (16:58 +0100)
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 */