The Samba-Bugzilla – Attachment 10576 Details for
Bug 10940
Samba 4.2rc2: pdb_set_pw_history: data_blob_talloc() failed!
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for v4-2-test
tmp42.diff.txt (text/plain), 1.75 KB, created by
Stefan Metzmacher
on 2015-01-05 18:21:28 UTC
(
hide
)
Description:
Patch for v4-2-test
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2015-01-05 18:21:28 UTC
Size:
1.75 KB
patch
obsolete
>From f5512dee00ea69d9fa4023ef4c224c2ff4f60836 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Wed, 24 Dec 2014 13:58:12 +0100 >Subject: [PATCH] s3:passdb: fix logic in pdb_set_pw_history() > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=10940 > >Signed-off-by: Stefan Metzmacher <metze@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> > >Autobuild-User(master): Volker Lendecke <vl@samba.org> >Autobuild-Date(master): Mon Jan 5 16:51:30 CET 2015 on sn-devel-104 > >(cherry picked from commit c5948040805f2585dd9da3a6955f605d8d9fa70c) >--- > source3/passdb/pdb_get_set.c | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > >diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c >index 1b716f4..5e162db 100644 >--- a/source3/passdb/pdb_get_set.c >+++ b/source3/passdb/pdb_get_set.c >@@ -872,19 +872,20 @@ bool pdb_set_lanman_passwd(struct samu *sampass, const uint8 pwd[LM_HASH_LEN], e > > bool pdb_set_pw_history(struct samu *sampass, const uint8 *pwd, uint32_t historyLen, enum pdb_value_state flag) > { >+ DATA_BLOB new_nt_pw_his = {}; >+ > if (historyLen && pwd){ >- DATA_BLOB *old_nt_pw_his = &(sampass->nt_pw_his); >- sampass->nt_pw_his = data_blob_talloc(sampass, >- pwd, historyLen*PW_HISTORY_ENTRY_LEN); >- data_blob_free(old_nt_pw_his); >- if (!sampass->nt_pw_his.length) { >+ new_nt_pw_his = data_blob_talloc(sampass, >+ pwd, historyLen*PW_HISTORY_ENTRY_LEN); >+ if (new_nt_pw_his.length == 0) { > DEBUG(0, ("pdb_set_pw_history: data_blob_talloc() failed!\n")); > return False; > } >- } else { >- sampass->nt_pw_his = data_blob_talloc(sampass, NULL, 0); > } > >+ data_blob_free(&sampass->nt_pw_his); >+ sampass->nt_pw_his = new_nt_pw_his; >+ > return pdb_set_init_flags(sampass, PDB_PWHISTORY, flag); > } > >-- >1.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 10940
:
10565
|
10566
| 10576