summaryrefslogtreecommitdiffstats
path: root/source/auth
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-07-02 06:34:27 +0000
committerJeremy Allison <jra@samba.org>2002-07-02 06:34:27 +0000
commit17cae0d683be404be69554cd0e84117bdcc56c87 (patch)
treea29e303dfab1e74a5084bccaab92b010d90a754f /source/auth
parent80c3c68de20a686ced38356fd68f80a53e6f1626 (diff)
downloadsamba-17cae0d683be404be69554cd0e84117bdcc56c87.tar.gz
samba-17cae0d683be404be69554cd0e84117bdcc56c87.tar.xz
samba-17cae0d683be404be69554cd0e84117bdcc56c87.zip
Address the string_sub problem by changing len = 0 to mean "no expand".
Went through and checked all string_subs I could to ensure they're being used correctly. Jeremy.
Diffstat (limited to 'source/auth')
-rw-r--r--source/auth/auth_domain.c2
-rw-r--r--source/auth/auth_server.c2
-rw-r--r--source/auth/pampass.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/source/auth/auth_domain.c b/source/auth/auth_domain.c
index 99975077571..f9f250c26ae 100644
--- a/source/auth/auth_domain.c
+++ b/source/auth/auth_domain.c
@@ -69,7 +69,7 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli,
fstrcpy(remote_machine, server);
}
- standard_sub_basic(current_user_info.smb_name, remote_machine);
+ standard_sub_basic(current_user_info.smb_name, remote_machine, sizeof(remote_machine));
strupper(remote_machine);
if(!resolve_name( remote_machine, &dest_ip, 0x20)) {
diff --git a/source/auth/auth_server.c b/source/auth/auth_server.c
index 919cc8d3d8f..23faedc0bac 100644
--- a/source/auth/auth_server.c
+++ b/source/auth/auth_server.c
@@ -49,7 +49,7 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
p = pserver;
while(next_token( &p, desthost, LIST_SEP, sizeof(desthost))) {
- standard_sub_basic(current_user_info.smb_name, desthost);
+ standard_sub_basic(current_user_info.smb_name, desthost, sizeof(desthost));
strupper(desthost);
if(!resolve_name( desthost, &dest_ip, 0x20)) {
diff --git a/source/auth/pampass.c b/source/auth/pampass.c
index 211e8bce157..1a3e55dd44f 100644
--- a/source/auth/pampass.c
+++ b/source/auth/pampass.c
@@ -186,7 +186,7 @@ static void special_char_sub(char *buf)
static void pwd_sub(char *buf, const char *username, const char *oldpass, const char *newpass)
{
- pstring_sub(buf, "%u", username);
+ fstring_sub(buf, "%u", username);
all_string_sub(buf, "%o", oldpass, sizeof(fstring));
all_string_sub(buf, "%n", newpass, sizeof(fstring));
}