summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-02-04 18:09:48 +0100
committerVolker Lendecke <vl@samba.org>2009-02-04 18:11:46 +0100
commit8eb562a81db03bac3e4bb469eaa45e0969be924e (patch)
treeab9533962721672d426419c21ad93c026e66c222 /source3
parentde7f0a70c8293f1b87f9c821f16fd3c6f7b184b7 (diff)
downloadsamba-8eb562a81db03bac3e4bb469eaa45e0969be924e.tar.gz
samba-8eb562a81db03bac3e4bb469eaa45e0969be924e.tar.bz2
samba-8eb562a81db03bac3e4bb469eaa45e0969be924e.zip
Ensure null termination of the password in mymachinepw, remove a debug
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_netlogond.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/auth/auth_netlogond.c b/source3/auth/auth_netlogond.c
index a57f3b74a3..9191c751f3 100644
--- a/source3/auth/auth_netlogond.c
+++ b/source3/auth/auth_netlogond.c
@@ -134,8 +134,6 @@ static char *mymachinepw(TALLOC_CTX *mem_ctx)
return NULL;
}
- pwd[sizeof(pwd)-1] = '\0';
-
nread = read(fd, pwd, sizeof(pwd)-1);
close(fd);
@@ -144,7 +142,7 @@ static char *mymachinepw(TALLOC_CTX *mem_ctx)
return NULL;
}
- DEBUG(0, ("pwd: %d [%s]\n", (int)nread, pwd));
+ pwd[nread] = '\0';
if (pwd[nread-1] == '\n') {
pwd[nread-1] = '\0';