summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-03 13:19:27 -0700
committerJeremy Allison <jra@samba.org>2011-05-04 12:12:14 -0700
commita2915089de95dfc7c55d79a54ed70d279a2c6dfe (patch)
treed06e2165ca15e3e6f0169d3c88a8a2b0a577a870
parent0c464df22b4d1a488ebe6ae889305a76d517f3d8 (diff)
downloadsamba-a2915089de95dfc7c55d79a54ed70d279a2c6dfe.tar.gz
samba-a2915089de95dfc7c55d79a54ed70d279a2c6dfe.tar.bz2
samba-a2915089de95dfc7c55d79a54ed70d279a2c6dfe.zip
Remove obvious use of safe_strcpy + safe_strcat -> strlcpy + strlcat.
-rw-r--r--source3/auth/auth_script.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/auth/auth_script.c b/source3/auth/auth_script.c
index ad973106b1..5691ea14f1 100644
--- a/source3/auth/auth_script.c
+++ b/source3/auth/auth_script.c
@@ -74,32 +74,32 @@ static NTSTATUS script_check_user_credentials(const struct auth_context *auth_co
return NT_STATUS_NO_MEMORY;
}
- safe_strcpy( secret_str, user_info->mapped.domain_name, secret_str_len - 1);
- safe_strcat( secret_str, "\n", secret_str_len - 1);
- safe_strcat( secret_str, user_info->client.account_name, secret_str_len - 1);
- safe_strcat( secret_str, "\n", secret_str_len - 1);
+ strlcpy( secret_str, user_info->mapped.domain_name, secret_str_len);
+ strlcat( secret_str, "\n", secret_str_len);
+ strlcat( secret_str, user_info->client.account_name, secret_str_len);
+ strlcat( secret_str, "\n", secret_str_len);
for (i = 0; i < 8; i++) {
slprintf(&hex_str[i*2], 3, "%02X", auth_context->challenge.data[i]);
}
- safe_strcat( secret_str, hex_str, secret_str_len - 1);
- safe_strcat( secret_str, "\n", secret_str_len - 1);
+ strlcat( secret_str, hex_str, secret_str_len);
+ strlcat( secret_str, "\n", secret_str_len);
if (user_info->password.response.lanman.data) {
for (i = 0; i < 24; i++) {
slprintf(&hex_str[i*2], 3, "%02X", user_info->password.response.lanman.data[i]);
}
- safe_strcat( secret_str, hex_str, secret_str_len - 1);
+ strlcat( secret_str, hex_str, secret_str_len);
}
- safe_strcat( secret_str, "\n", secret_str_len - 1);
+ strlcat( secret_str, "\n", secret_str_len);
if (user_info->password.response.nt.data) {
for (i = 0; i < 24; i++) {
slprintf(&hex_str[i*2], 3, "%02X", user_info->password.response.nt.data[i]);
}
- safe_strcat( secret_str, hex_str, secret_str_len - 1);
+ strlcat( secret_str, hex_str, secret_str_len);
}
- safe_strcat( secret_str, "\n", secret_str_len - 1);
+ strlcat( secret_str, "\n", secret_str_len);
DEBUG(10,("script_check_user_credentials: running %s with parameters:\n%s\n",
script, secret_str ));