diff options
author | Volker Lendecke <vl@samba.org> | 2009-12-14 19:12:50 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2010-01-07 11:07:54 +0100 |
commit | ec0998ada5eebf5cae63719ef14097639ffef258 (patch) | |
tree | d28a636cbda80063c30628b108e74363b6973598 /source3 | |
parent | a3f522202ddc09d444e800ad1da2078975de01c1 (diff) | |
download | samba-ec0998ada5eebf5cae63719ef14097639ffef258.tar.gz samba-ec0998ada5eebf5cae63719ef14097639ffef258.tar.bz2 samba-ec0998ada5eebf5cae63719ef14097639ffef258.zip |
s3: Add a paranoia check to pdb_set_plaintext_passwd()
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/pdb_get_set.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index f0c3fb193a..ba19b6bd43 100644 --- 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. |