1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

1772 Commits

Author SHA1 Message Date
Günther Deschner
2330e52cac s3-passdb: use tevent_context in passdb.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Oct 28 13:09:47 CEST 2011 on sn-devel-104
2011-10-28 13:09:47 +02:00
Simo Sorce
605d7d965a pdb-interface: Do not use unid_t here
This interface needs to be publicly available, unid_t here is not really useful
and makes it harder to use it as unid_t is not a public union.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Oct 18 20:57:16 CEST 2011 on sn-devel-104
2011-10-18 20:57:16 +02:00
Günther Deschner
111372541f s3-passdb: remove libwbclient header dependency for passdb/lookup_sid.h.
Guenther
2011-10-14 12:07:25 +02:00
Günther Deschner
876f48ffb1 s3-passdb: remove fstring from pdb_set_user_sid_from_string().
Guenther
2011-10-14 12:07:25 +02:00
Günther Deschner
d47c25401a s3-passdb: add define guards for machine_sid.h.
Guenther
2011-10-14 12:07:24 +02:00
Günther Deschner
d6a1867349 s3-passdb: use uintX_t at least in headers.
Guenther
2011-10-14 12:07:24 +02:00
Günther Deschner
d981ceb464 s3-passdb: move passdb prototypes into passdb.h
Guenther
2011-10-14 12:07:24 +02:00
Simo Sorce
995d156726 s3-group-mapping: Remove fstrings from GROUP_MAP.
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 12 19:28:12 CEST 2011 on sn-devel-104
2011-10-12 19:28:12 +02:00
Michael Adam
6760011761 s3:dbwrap: change dbwrap_store_uint32() to NTSTATUS return type
for consistency and better error propagation

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Oct 11 15:51:00 CEST 2011 on sn-devel-104
2011-10-11 15:51:00 +02:00
Michael Adam
c9bc1e4924 s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return type
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
658f72128f s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of bool)
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
603c3e1bcb s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return code
Return the int32 value retrieved from the db by reference.
Before this, return value "-1" was used as a error indication,
but it could also be a valid value from the database.
2011-10-11 14:17:58 +02:00
Michael Adam
f03e4aea66 s3:passdb:account_pol: use dbwrap_fetch_uint32, not dbwrap_fetch_int32 for the DB version
This is also stored as uint32_t.
2011-10-11 14:17:58 +02:00
Michael Adam
3f214284c7 s3:secrets: convert to use dbwrap wrapper functions only
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
8b4845bd75 s3:passdb: convert account_pol to use dbwrap wrapper functions only
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
8b4dd99dae s3:passdb: convert machine_sid to use dbwrap wrapper functions only
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
a91f06a722 s3:passdb: convert pdb_tdb to use dbwrap wrapper functions.
Avoid direct use of the db_record and db_context structs
2011-10-11 14:17:57 +02:00
Michael Adam
0e28448a78 s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS 2011-10-11 14:17:56 +02:00
Günther Deschner
e5682847fa s3-passdb: split out passdb/pdb_ipa.h.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Oct 11 12:15:36 CEST 2011 on sn-devel-104
2011-10-11 12:15:36 +02:00
Günther Deschner
6cc2843dc6 s3-passdb: split out passdb/pdb_nds.h.
Guenther
2011-10-11 10:41:29 +02:00
Günther Deschner
a1f4fe7e08 s3-passdb: split out passdb/pdb_ldap.h.
Guenther
2011-10-11 10:41:29 +02:00
Andrew Bartlett
b21b012756 lib/param move source4 param code to the top level
This is done so that the lpcfg_ functions are available across the whole
build, either with the struct loadparm_context loaded from an smb.conf directly
or as a wrapper around the source3 param code.

This is not the final, merged loadparm, but simply one step to make
it easier to solve other problems while we make our slow progress
on this difficult problem.

Andrew Bartlett
2011-10-11 13:41:34 +11:00
Günther Deschner
795aefec0c s3-passdb: split out passdb/pdb_smbpasswd.h.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 10 20:14:46 CEST 2011 on sn-devel-104
2011-10-10 20:14:46 +02:00
Günther Deschner
8c2f72d6b8 s3-passdb: split out passdb/pdb_wbc_sam.h.
Guenther
2011-10-10 18:40:40 +02:00
Günther Deschner
efab0086ba s3-passdb: split out passdb/pdb_tdb.h.
Guenther
2011-10-10 18:40:33 +02:00
Andrew Bartlett
4980cd772a build: Remove _SAMBA_WAF_BUILD_
The _SAMBA_BUILD_ macro can pick the difference between autoconf and waf builds now

Andrew Bartlett
2011-10-07 17:45:20 +11:00
Andrew Bartlett
055f017b36 build: Reduce build systems to just top level waf and autoconf
The s3-waf build system is a key component of the top level build, but
with this commit is is no longer available directly.  This reduces the
number of build system combinations in master as we prepare for the
Samba 4.0 release.

Andrew Bartlett
2011-10-07 17:42:03 +11:00
Andrew Bartlett
b5cc6a0ad2 s3-pdb_samba4: Remove unused attribute from domain search 2011-09-27 22:43:06 +02:00
Simo Sorce
f7419172f0 s3-passdb: Cleanup use of fstring and move to talloc.
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-09-26 18:25:26 +02:00
Sumit Bose
751e7d4d33 s3-pdb_ipa: Add supprted encryption types to struct pdb_trusted_domain
Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-31 12:53:36 +02:00
Sumit Bose
4f6de78a12 s3-pdb_ipa: Add posix offset to struct pdb_trusted_domain
Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-31 12:52:52 +02:00
Sumit Bose
bb86062f61 s3-pdb_ipa: Derive domain GUID from SID
Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-31 11:34:25 +02:00
Amitay Isaacs
322b5253f4 s3-passdb: Allocate talloc stackframe before calling pdb_get_group_sid()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26 14:06:07 +02:00
Amitay Isaacs
17c74e5dfd s3-passdb: Make domain_sid argument optional for search_aliases method
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26 10:06:33 +10:00
Amitay Isaacs
0cfeb65a0b s3-passdb: Return assigned number of hours and not MAX_HOURS_LEN
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26 10:06:33 +10:00
Amitay Isaacs
a38a3b16e1 s3-passdb: Convert lm_pw and nt_pw to python string using length
lm_pw and nt_pw are fixed length strings and convert them to python
strings as fixed length strings.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26 10:06:32 +10:00
Andrew Tridgell
fb612af655 pdb-samba4: use ldb_get_default_basedn() instead of NULL
this makes pdb-samba4 safe for multi-domain setups

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:37 +10:00
Andreas Schneider
d713f9e9f5 s3-passdb: Only delete 1 entry from memcache.
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-21 16:39:10 +02:00
Andreas Schneider
99bb3eed1d s3-passdb: Remove always the user from getpwsid cache.
We should do it always, not only in the pdb_default_delete_user()
function.

Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:08:25 -04:00
Andreas Schneider
1152aa8e03 s3-passdb: Keep caches coherent
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-21 09:08:25 -04:00
Andreas Schneider
177db0a880 s3-id_cache: Move id caches mgmt out of smbd
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-21 09:08:25 -04:00
Matthias Dieter Wallnöfer
c21c254508 s3:passdb/py_passdb.c - restore Python >= 2.4 compatibility
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-19 21:03:44 +02:00
Andrew Bartlett
0db0e93517 s3-passdb pdb_samba4 handles PDB_PWHISTORY already
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-19 10:40:16 +02:00
Amitay Isaacs
22cce00151 s3-passdb: Fix the get/set routines for pw_history for samu
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-19 16:35:11 +10:00
Amitay Isaacs
dadaca01d2 s3-passdb: Display username when reporting error on add_sam_account.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:08 +10:00
Amitay Isaacs
876f9cc290 s3-passdb: Use pdb_get_nt_passwd() to get nt passwd.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:07 +10:00
Amitay Isaacs
0fef5a3a26 s3-passdb: Fix call for search_aliases(). It returns bool and not NTSTATUS.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:02 +10:00
Amitay Isaacs
1c1f4e27a8 s3-passdb: Return list of sids from python wrapper enum_group_members
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-19 16:35:01 +10:00
Amitay Isaacs
590ed81c48 s3-passdb: Make arguments for python wrapper enum_group_mapping() optional
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-19 16:35:00 +10:00
Amitay Isaacs
f4c7a448d4 s3-passdb: Added python wrapper for passdb methods
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-19 16:34:59 +10:00