summaryrefslogtreecommitdiff
path: root/source3/libnet/libnet_samsync_ldif.c
AgeCommit message (Collapse)AuthorFilesLines
2013-03-06Make sure to set umask() before calling mkstemp().Andreas Schneider1-2/+28
Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Mar 6 01:16:34 CET 2013 on sn-devel-104
2012-07-18loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell1-20/+20
They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-11-16s3-passdb: split out passdb/pdb_ldap_schema.cGünther Deschner1-1/+1
Guenther
2011-06-09s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()Andrew Bartlett1-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()Andrew Bartlett1-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_REALLOC_ARRAY isn't standard talloc. Andrew Bartlett
2011-05-31s3-lib Move sstring_sub() to it's only user and make staticAndrew Bartlett1-0/+27
This should not be used more generally, as it is specifically not for multibyte strings, and uses malloc rather than talloc. Andrew Bartlett
2011-03-30s3-passdb: add passdb.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-build: only include transfer_file.h where needed.Günther Deschner1-0/+1
Guenther
2010-09-20s3-build: only include smbldap.h where needed.Günther Deschner1-0/+1
Guenther
2010-09-09Fox missing SMB_MALLOC return checks noticed by "Andreas Moroder ↵Jeremy Allison1-0/+3
<andreas.moroder@gmx.net>". Jeremy.
2010-05-12work around AIX6.1 name space pollution rename mod_name to module_nameOlaf Flebbe1-8/+8
2009-04-20Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() ifJelmer Vernooij1-2/+2
the system one is broken.
2009-01-29Fix coverity CID#117 - resource leak in error path.Jeremy Allison1-24/+53
Jeremy.
2009-01-29Fix coverity CID#116. Resource leak on error path.Jeremy Allison1-2/+4
Jeremy.
2009-01-29Fix coverity CID#115. Resource leak in error path.Jeremy Allison1-1/+4
Jeremy.
2008-12-23Fix another "format not a string literal and no format arguments" warning.Jeremy Allison1-2/+5
Jeremy
2008-11-18s3-libnet-samsync: pass sequence number pointer to process routine.Günther Deschner1-0/+2
Guenther
2008-11-18s3-libnet-samsync: move all modules to startup,process,finish callbacks.Günther Deschner1-29/+76
Guenther
2008-11-18s3-libnet-samsync: use samsync_ops.Günther Deschner1-10/+10
Guenther
2008-11-18s3-libnet-samsync: add samsync_ops to all samsync modules.Günther Deschner1-0/+4
Guenther
2008-10-22Fix net rpc vampire, based on an *amazing* piece of debugging work by ↵Jeremy Allison1-6/+5
"Cooper S. Blake" <the_analogkid@yahoo.com>. "I believe I have found two bugs in the 3.2 code and one bug that carried on to the 3.3 branch. In the 3.2 code, everything is located in the utils/net_rpc_samsync.c file. What I believe is the first problem is that fetch_database() is calling samsync_fix_delta_array() with rid_crypt set to true, which means the password hashes are unencrypted from the RID encryption. However, I believe this call is redundant, and the corresponding call for samdump has rid_crypt set to false. So I think the rid_crypt param should be false in fetch_database(). If you follow the code, it makes its way to sam_account_from_delta() where the password hashes are decrypted a second time by calling sam_pwd_hash(). I believe this is what is scrambling my passwords. These methods were refactored somewhere in the 3.3 branch. Now the net_rpc_samsync.c class calls rpc_vampire_internals, which calls libnet/libnet_samsync.c, which calls samsync_fix_delta_array() with rid_crypt always set to false. I think that's correct. But the second bug has carried through in the sam_account_from_delta() function: 208 if (memcmp(r->ntpassword.hash, zero_buf, 16) != 0) { 209 sam_pwd_hash(r->rid, r->ntpassword.hash, lm_passwd, 0); 210 pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED); 211 } 212 213 if (memcmp(r->lmpassword.hash, zero_buf, 16) != 0) { 214 sam_pwd_hash(r->rid, r->lmpassword.hash, nt_passwd, 0); 215 pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED); If you look closely you'll see that the nt hash is going into the lm_passwd variable and the decrypted value is being set in the lanman hash, and the lanman hash is being decrypted and put into the nt hash field. So the LanMan and NT hashes look like they're being put in the opposite fields." Fix this by removing the rid_crypt parameter. Jeremy.
2008-08-08libnet samsync ldif: fix the build without LDAP.Michael Adam1-0/+15
Michael (This used to be commit 32df05bd1f49f2290ad69f84d5a47207b1469629)
2008-07-18Use LDAP macros instead of attribute names.Karolin Seeger1-24/+24
Karolin (This used to be commit 7dae8b04f126d0ac86a452dcf373a690ee687ead)
2008-06-27net_vampire: use bool for last_query information in samsync.Günther Deschner1-2/+2
Guenther (This used to be commit fa1976e23a33bd3fab17c3f6ab5573ee1fdf9e31)
2008-06-23net_vampire: fix included header.Günther Deschner1-1/+1
Guenther (This used to be commit 1dbe6ea8607549649f69e1b63cc427efe67e0778)
2008-06-17net_vampire: add error and result_message to samsync_context.Günther Deschner1-1/+6
Guenther (This used to be commit e0b117200441f842fbc11cc817ab2cde4d63a22e)
2008-06-17net_vampire: use generic output filename and use correct argv element.Günther Deschner1-1/+1
Guenther (This used to be commit e0843e631e379645296a5fe34dfc83bc265ebef3)
2008-06-17net_vampire: move ldif code out of net_rpc_samsync.cGünther Deschner1-0/+1209
Guenther (This used to be commit 1d5758ec3a5160e5649242c42f6e4a7b39eb6199)