get_share (called from 'net conf showshare') does a lookup of the share
name case-insensitively. As the registry stores the share name in the
correct case and 'net conf list' prints the correct case, also lookup
the correct case for get_share.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
^samba.tests.ntlmdisabled.python\(ktest\).python2.ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ktest\)
^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python3.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\)
^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python2.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\)
-^samba3.blackbox.net.rpc.conf.test_conf_showshare_case\(nt4_dc\)
}
if (servicename != NULL) {
- tmp_service->name = talloc_strdup(tmp_service, servicename);
- if (tmp_service->name == NULL) {
- err = SBC_ERR_NOMEM;
- goto done;
+ WERROR werr;
+ uint32_t count = 0;
+ char *name = NULL;
+
+ /*
+ * Determine correct upper/lowercase.
+ */
+ for (count = 0;
+ werr = reg_enumkey(tmp_ctx, rpd(ctx)->base_key, count,
+ &name, NULL),
+ W_ERROR_IS_OK(werr);
+ count++) {
+ if (!strequal(name, servicename)) {
+ continue;
+ }
+
+ tmp_service->name = talloc_strdup(tmp_service, name);
+ if (tmp_service->name == NULL) {
+ err = SBC_ERR_NOMEM;
+ goto done;
+ }
+ break;
}
}