summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-07-03 19:11:31 +0000
committerJeremy Allison <jra@samba.org>2003-07-03 19:11:31 +0000
commitce72beb2b558d86fb49063c6b1fa00e07952ce56 (patch)
tree9c00a82c30d6edb2d9ce269653e739236ede67ce /source3/utils
parent6b31240391949fb6afa83853aa3df30b354d508a (diff)
downloadsamba-ce72beb2b558d86fb49063c6b1fa00e07952ce56.tar.gz
samba-ce72beb2b558d86fb49063c6b1fa00e07952ce56.tar.bz2
samba-ce72beb2b558d86fb49063c6b1fa00e07952ce56.zip
Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings. Jeremy. (This used to be commit ff222716a08af65d26ad842ce4c2841cc6540959)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c4
-rw-r--r--source3/utils/net_rpc.c12
-rw-r--r--source3/utils/net_rpc_join.c4
-rw-r--r--source3/utils/smbpasswd.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index e97ab6fc2b..69d282420d 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -162,7 +162,7 @@ retry:
if ((cp = strchr(ads->auth.user_name, '@'))!=0) {
*cp++ = '\0';
ads->auth.realm = smb_xstrdup(cp);
- strupper(ads->auth.realm);
+ strupper_m(ads->auth.realm);
}
status = ads_connect(ads);
@@ -1039,7 +1039,7 @@ int net_ads_changetrustpw(int argc, const char **argv)
}
hostname = strdup(global_myname());
- strlower(hostname);
+ strlower_m(hostname);
asprintf(&host_principal, "%s@%s", hostname, ads->config.realm);
SAFE_FREE(hostname);
d_printf("Changing password for principal: HOST/%s\n", host_principal);
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 552aacebbd..890d4a012b 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -255,7 +255,7 @@ static NTSTATUS rpc_oldjoin_internals(const DOM_SID *domain_sid, struct cli_stat
}
fstrcpy(trust_passwd, global_myname());
- strlower(trust_passwd);
+ strlower_m(trust_passwd);
/*
* Machine names can be 15 characters, but the max length on
@@ -1633,7 +1633,7 @@ static NTSTATUS rpc_trustdom_add_internals(const DOM_SID *domain_sid, struct cli
return NT_STATUS_NO_MEMORY;
}
- strupper(acct_name);
+ strupper_m(acct_name);
/* Get samr policy handle */
result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
@@ -1764,11 +1764,11 @@ static int rpc_trustdom_establish(int argc, const char **argv)
}
domain_name = smb_xstrdup(argv[0]);
- strupper(domain_name);
+ strupper_m(domain_name);
/* account name used at first is our domain's name with '$' */
asprintf(&acct_name, "%s$", lp_workgroup());
- strupper(acct_name);
+ strupper_m(acct_name);
/*
* opt_workgroup will be used by connection functions further,
@@ -1933,7 +1933,7 @@ static int rpc_trustdom_revoke(int argc, const char **argv)
/* generate upper cased domain name */
domain_name = smb_xstrdup(argv[0]);
- strupper(domain_name);
+ strupper_m(domain_name);
/* delete password of the trust */
if (!trusted_domain_password_delete(domain_name)) {
@@ -2167,7 +2167,7 @@ static int rpc_trustdom_list(int argc, const char **argv)
do padding[--pad_len] = ' '; while (pad_len);
/* set opt_* variables to remote domain */
- strupper(trusting_dom_names[i]);
+ strupper_m(trusting_dom_names[i]);
opt_workgroup = talloc_strdup(mem_ctx, trusting_dom_names[i]);
opt_target_workgroup = opt_workgroup;
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index e8fa39ec92..22ed49c74f 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -204,7 +204,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
/* Create domain user */
acct_name = talloc_asprintf(mem_ctx, "%s$", global_myname());
- strlower(acct_name);
+ strlower_m(acct_name);
const_acct_name = acct_name;
result = cli_samr_create_dom_user(cli, mem_ctx, &domain_pol,
@@ -337,7 +337,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
/* Now store the secret in the secrets database */
- strupper(domain);
+ strupper_m(domain);
if (!secrets_store_domain_sid(domain, &domain_sid)) {
DEBUG(0, ("error storing domain sid for %s\n", domain));
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index 577e467fbd..0b2714cbf8 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -392,7 +392,7 @@ static int process_root(int local_flags)
if (local_flags & LOCAL_ADD_USER) {
SAFE_FREE(new_passwd);
new_passwd = smb_xstrdup(user_name);
- strlower(new_passwd);
+ strlower_m(new_passwd);
}
/*