diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-05-03 12:16:16 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-05-03 07:37:07 +0200 |
commit | 2742ec0e34c06ded2885aa2607f1c1729a57b034 (patch) | |
tree | c10f1501c68c54ffc61c1f3545f7d272187b0aa2 /source4/dsdb/samdb | |
parent | 39081a20c5b570430e28866e34ae965c60ee2039 (diff) | |
download | samba-2742ec0e34c06ded2885aa2607f1c1729a57b034.tar.gz samba-2742ec0e34c06ded2885aa2607f1c1729a57b034.tar.bz2 samba-2742ec0e34c06ded2885aa2607f1c1729a57b034.zip |
Remove strlower_m() and strupper_m() from source4 and common code.
This function is problematic because a string may expand in size when
changed into upper or lower case. This will then push characters off
the end of the string in the s3 implementation, or panic in the former
s4 implementation.
Andrew Bartlett
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/rootdse.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index b718900345..7bc27b46b4 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -222,11 +222,10 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms struct loadparm_context); char *ldap_service_name, *hostname; - hostname = talloc_strdup(msg, lpcfg_netbios_name(lp_ctx)); + hostname = strlower_talloc(msg, lpcfg_netbios_name(lp_ctx)); if (hostname == NULL) { goto failed; } - strlower_m(hostname); ldap_service_name = talloc_asprintf(msg, "%s:%s$@%s", samdb_forest_name(ldb, msg), |