git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3f5222
)
s3: Add a paranoia check to pdb_set_plaintext_passwd()
author
Volker Lendecke
<vl@samba.org>
Mon, 14 Dec 2009 18:12:50 +0000
(19:12 +0100)
committer
Michael Adam
<obnox@samba.org>
Thu, 7 Jan 2010 10:07:54 +0000
(11:07 +0100)
source3/passdb/pdb_get_set.c
patch
|
blob
|
history
diff --git
a/source3/passdb/pdb_get_set.c
b/source3/passdb/pdb_get_set.c
index f0c3fb193afe45bf7d82eb83b795a6103364d7aa..ba19b6bd4380fe9cab41a9e00ba3f42e7ab2ef00 100644
(file)
--- a/
source3/passdb/pdb_get_set.c
+++ b/
source3/passdb/pdb_get_set.c
@@
-1036,6
+1036,11
@@
bool pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext)
*/
pwhistory = (uchar *)pdb_get_pw_history(sampass, ¤t_history_len);
+ if ((current_history_len != 0) && (pwhistory == NULL)) {
+ DEBUG(1, ("pdb_set_plaintext_passwd: pwhistory == NULL!\n"));
+ return false;
+ }
+
if (current_history_len < pwHistLen) {
/*
* Ensure we have space for the needed history.