git.samba.org
/
tprouty
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de7f0a7
)
Ensure null termination of the password in mymachinepw, remove a debug
author
Volker Lendecke
<vl@samba.org>
Wed, 4 Feb 2009 17:09:48 +0000
(18:09 +0100)
committer
Volker Lendecke
<vl@samba.org>
Wed, 4 Feb 2009 17:11:46 +0000
(18:11 +0100)
source3/auth/auth_netlogond.c
patch
|
blob
|
history
diff --git
a/source3/auth/auth_netlogond.c
b/source3/auth/auth_netlogond.c
index a57f3b74a3662a0353acc62a181ee4ef29d24b2f..9191c751f37c8e33b485929ddf55c28653f9137a 100644
(file)
--- 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';