summaryrefslogtreecommitdiff
path: root/source3/passdb
AgeCommit message (Collapse)AuthorFilesLines
2011-08-21s3-passdb: Only delete 1 entry from memcache.Andreas Schneider1-1/+4
If we delete or update one user we shouldn't flush the complete memcache. Signed-off-by: Simo Sorce <idra@samba.org> Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Sun Aug 21 16:39:10 CEST 2011 on sn-devel-104
2011-08-21s3-passdb: Remove always the user from getpwsid cache.Andreas Schneider1-3/+8
We should do it always, not only in the pdb_default_delete_user() function. Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-passdb: Keep caches coherentAndreas Schneider1-1/+23
When deleting a user send a message to all interested parties so they can purge their caches. Otherwise some processes may positively respond with a cached getpwnam, when the user have actully been removed. Without this some tests that remove and then immediately create users are flakey. Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-id_cache: Move id caches mgmt out of smbdAndreas Schneider2-70/+0
We must leave the MSG_IDMAP_KILL operation in SMBD as it uses smbd specific internal globals and makes sense only in the context of a smbd daemon. The rest is moved under lib/ as we need to deal with id cache cleanups in other daemons too (like lsasd). Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-19s3:passdb/py_passdb.c - restore Python >= 2.4 compatibilityMatthias Dieter Wallnöfer1-0/+7
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Fri Aug 19 21:03:44 CEST 2011 on sn-devel-104
2011-08-19s3-passdb pdb_samba4 handles PDB_PWHISTORY alreadyAndrew Bartlett1-1/+0
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Aug 19 10:40:16 CEST 2011 on sn-devel-104
2011-08-19s3-passdb: Fix the get/set routines for pw_history for samuAmitay Isaacs1-2/+2
Return pw_history with current string length (which is a multiple of PW_HISTORY_ENTRY_LEN) and same thing for setting the pw_history. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19s3-passdb: Display username when reporting error on add_sam_account.Amitay Isaacs1-1/+2
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19s3-passdb: Use pdb_get_nt_passwd() to get nt passwd.Amitay Isaacs1-1/+1
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19s3-passdb: Fix call for search_aliases(). It returns bool and not NTSTATUS.Amitay Isaacs1-4/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19s3-passdb: Return list of sids from python wrapper enum_group_membersAmitay Isaacs1-5/+9
Instead of returning rids as the C api does, return sids, so it is similar to enum_aliasmem and can be used easily in s3_upgrade. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19s3-passdb: Make arguments for python wrapper enum_group_mapping() optionalAmitay Isaacs1-5/+10
Set the defaults, if no arguments are provided. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19s3-passdb: Added python wrapper for passdb methodsAmitay Isaacs1-21/+831
Added following methods - uid_to_sid, gid_to_sid, sid_to_id, new_rid - get_trusteddom_pw, set_trusteddom_pw, del_trusteddom_pw, enum_trusteddoms - get_trusted_domain, get_trusted_domain_by_sid, set_trusted_domain, del_trusted_domain, enum_trusted_domains - get_secret, set_secret, delete_secret Updated documentation for all methods Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19s3-passdb: Python wrapper for passdbAmitay Isaacs1-8/+1283
- Added Groupmap python wrapper - Added passdb methods getgrsid, getgrgid, getgrnam create_dom_group, delete_dom_group add_group_mapping_entry, update_group_mapping_entry, delete_group_mapping_entry enum_group_mapping, enum_group_members add_groupmem, del_groupmem create_alias, delete_alias get_aliasinfo, set_aliasinfo add_aliasmem, del_aliasmem, enum_aliasmem get_account_policy, set_account_policy search_groups, search_aliases Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19s3-passdb: Replace SMB_MALLOC_ARRAY()/SAFE_FREE() with talloc equivalents.Amitay Isaacs2-8/+7
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-18s3/ldap: don't continue if we couldn't get the domain info on startupBjörn Jacke1-7/+4
while some things work without the domain info, some important things don't, which is highly irritating. As even calls like EnumTrustDom fail and thus clients' domain logins fail we are sufficiently broken to refuse to go on. Autobuild-User: Björn Jacke <bj@sernet.de> Autobuild-Date: Thu Aug 18 12:48:37 CEST 2011 on sn-devel-104
2011-08-15s3-passdb Use supplied pdb_methods in default passdb search handlersAndrew Bartlett1-5/+7
2011-08-14s3-passdb: Fix python < 2.6 build errors in passdb python wrapperAndrew Bartlett1-0/+4
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sun Aug 14 03:59:48 CEST 2011 on sn-devel-104
2011-08-13s3-passdb: Added python method to get_global_sam_sidAmitay Isaacs1-0/+31
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13s3-passdb: Return dom_sid and guid with correct python types.Amitay Isaacs1-7/+31
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13passdb: Move python wrapper for passdb in samba3 python packageAmitay Isaacs1-1/+1
2011-08-13s3-passdb: Connect to specified samdb if location is provided, otherwise use ↵Amitay Isaacs1-1/+9
default Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13s3-passdb: Fix the error messages and return correct NTSTATUSAmitay Isaacs1-6/+8
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13s4-scripting Rename passdb upgrade routine to avoid conflict with ↵Andrew Bartlett1-14/+7
upgradeprovision
2011-08-13s3-passdb Add support for pdb_add_sam_account() and password hashes to ↵Andrew Bartlett1-69/+222
pdb_samba4 This will help when using this as part of the Samba3 passdb -> Samba4 ldb database upgrade script. Andrew Bartlett
2011-08-13s4-dsdb Add ability to force a particular SID in the upgrade caseAndrew Bartlett1-1/+2
2011-08-13s3-passdb Make pdb_element_is_changed available to all passdb modulesAndrew Bartlett3-29/+33
This will allow pdb_samba4 to use this Andrew Bartlett
2011-08-13passdb: Allocate talloc stackframe before calling in pdb functions.Amitay Isaacs1-2/+32
2011-08-13passdb: Call with correct backend methods instead of default methodsAmitay Isaacs3-10/+15
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13passdb: Added python wrapper to passdbAmitay Isaacs2-0/+1560
- Added python wrapper for samu structure. - Added python wrapper for passdb methods: domain_info(), getsampwnam(), getsampwsid(), create_user(), delete_user(), add_sam_account(), delete_sam_account(), update_sam_account(), rename_sam_account(), search_users() Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13passdb: Add a function to read secrets db from a specified pathAmitay Isaacs1-6/+16
This allows to load secrets db from a different location. The original secrets_init() now calls secrets_init_path() with lp_private_dir().
2011-08-13passdb: Add a function to expose loaded backend list.Amitay Isaacs2-0/+7
This function is used in python wrapper to list available python backends.
2011-07-31s3-secrets: add lsa_secret passdb api.Günther Deschner2-3/+245
Guenther
2011-07-31s3-passdb: add dummy calls to control global (replicated) secrets.Günther Deschner2-0/+80
Guenther
2011-07-29s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam5-5/+5
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam3-0/+3
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and make the fallbacke implementation functoins non-static and create a dbwrap_private.h header file that contains their prototypes.
2011-07-28s3-waf: the passdb subsystem needs to be called pdbAndrew Tridgell1-6/+6
the 'pdb' name is builtin to the passdb module loading code as a fixed string. We need to call the subsystem pdb so that external passdb modules end up in bin/modules/pdb/ where they can be found by the Samba3 module loader Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-19First part of fix for bug 8310 - toupper_ascii() is broken on big-endian systemsJeremy Allison1-4/+4
Remove int toupper_ascii(int c); int tolower_ascii(int c); int isupper_ascii(int c); int islower_ascii(int c); and replace with their _m equivalents, as they are identical.
2011-07-08lib/util Move bitmap.c to lib/utilAndrew Bartlett1-0/+1
2011-07-04s3-build link passdb modules against libpassdbAndrew Bartlett1-11/+6
This ensures that they don't include a duplicate copy of pdb_interface.c functions, because they will instead link the library. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Jul 4 12:24:50 CEST 2011 on sn-devel-104
2011-07-04s3-build allow_undefined_symbols=False is the default nowAndrew Bartlett1-1/+0
2011-06-28s3-waf: add some missing tdb dependencies.Günther Deschner1-1/+1
Guenther
2011-06-21lib/util Remove samba-util-common!Andrew Bartlett1-3/+3
All of this code is now in common, so we don't need the second '-common' library any more! Andrew Bartlett
2011-06-20tdb_compat: Higher level API fixes.Rusty Russell1-2/+2
My previous patches fixed up all direct TDB callers, but there are a few utility functions and the db_context functions which are still using the old -1 / 0 return codes. It's clearer to fix up all the callers of these too, so everywhere is consistent: non-zero means an error. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-12s3-passdb: Implement new pdb trust calls for the default backendSumit Bose1-2/+102
Signed-off-by: Simo Sorce <idra@samba.org> Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Sun Jun 12 06:45:25 CEST 2011 on sn-devel-104
2011-06-09s3-param Remove special case for global_myname(), rename to lp_netbios_name()Andrew Bartlett2-8/+8
There is no reason this can't be a normal constant string in the loadparm system, now that we have lp_set_cmdline() to handle overrides correctly. Andrew Bartlett
2011-06-09s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()Andrew Bartlett2-3/+3
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 Bartlett3-3/+3
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_P() to talloc()Andrew Bartlett4-4/+4
Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett6-15/+15
Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.