summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-12-14 18:44:38 +0100
committerMichael Adam <obnox@samba.org>2010-01-07 11:07:53 +0100
commit7633837026d56ee723ffb603c9bd884ff6c69ef3 (patch)
tree54fc8af9793937594f0b80149ef833fe46d26837 /source3/passdb
parent864ed92954315600ddcef69b21face95c06224a4 (diff)
downloadsamba-7633837026d56ee723ffb603c9bd884ff6c69ef3.tar.gz
samba-7633837026d56ee723ffb603c9bd884ff6c69ef3.tar.bz2
samba-7633837026d56ee723ffb603c9bd884ff6c69ef3.zip
s3: Simplify pdb_set_plaintext_passwd: memcpy deals fine with 0 bytes
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_get_set.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c
index 149dde0802..968da9d8d1 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -1058,11 +1058,8 @@ bool pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext)
return False;
}
- /* And copy it into the new buffer. */
- if (current_history_len) {
- memcpy(new_history, pwhistory,
- current_history_len*PW_HISTORY_ENTRY_LEN);
- }
+ memcpy(new_history, pwhistory,
+ current_history_len*PW_HISTORY_ENTRY_LEN);
pwhistory = new_history;
}