git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76a9af7
)
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
Karolin Seeger
<kseeger@samba.org>
Mon, 25 Jan 2010 11:41:56 +0000
(12:41 +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 87faf2b9ba84809d69041244071df94aa2aece1f..f2e88a17fe87a5cd772f070b1b3779dea827b276 100644
(file)
--- a/
source3/passdb/pdb_get_set.c
+++ b/
source3/passdb/pdb_get_set.c
@@
-1035,6
+1035,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.