Michael Adam
0a24c038b7
Remove unused function is_trusted_domain_situation().
...
This combined check has been replaced by is_dc_trusted_domain_situation()
which does not check for lp_allow_trusted_domains().
Michael
2008-05-26 16:42:25 +02:00
Michael Adam
aa1b8287f4
passdb: check for is_dc_trusted_domain_situation() in get_trust_pw_hash().
...
Before fetching legacy password hash, check for trusted domain situation,
but also fail if trusted domain support is not enabled.
Michael
2008-05-26 16:42:24 +02:00
Michael Adam
5f197c659e
passdb: add comment explaining logic in get_trust_pw_clear().
...
Michael
2008-05-26 16:42:24 +02:00
Michael Adam
0b26bcd3be
passdb: in get_trust_pw_clear() correctly fail if trusted domains not supported
...
(but trusted domain situation was found)
This completes the fix for bugs #5425 and #5451 by Steven Dannemann,
in that now no special cases are left uncovered.
Michael
2008-05-26 16:42:24 +02:00
Michael Adam
a284c88435
Add function is_dc_trusted_domain_situation().
...
This is like is_trusted_domain_situation() except that it does not
check for lp_allow_trusted_domains().
Michael
2008-05-26 16:42:24 +02:00
Gerald W. Carter
69b37ae607
Manually port Steven Dannenman fix for using the correct machine domain when
...
looking up trust credentials in our tdb.
commit fd0ae47046d37ec8297396a2733209c4d999ea91
Author: Steven Danneman <sdanneman@isilon.com>
Date: Thu May 8 13:34:49 2008 -0700
Use machine account and machine password from our domain when
contacting trusted domains.
2008-05-23 15:19:58 -05:00
Tim Prouty
6b189dabc5
Cleanup size_t return values in callers of convert_string_allocate
...
This patch is the second iteration of an inside-out conversion to cleanup
functions in charcnv.c returning size_t == -1 to indicate failure.
2008-05-20 22:40:13 +02:00
Volker Lendecke
1444db8be1
Fix a panic in the [ug]id2sid valgrind bug fix
...
Always, always run "make test" before pushing stuff :-)
2008-05-06 13:56:21 +02:00
Volker Lendecke
8717085dba
Fix a valgrind bug in the new [ug]id2sid cache
...
When we're given a SID, it is not always padded with zeros. Only look at the
initialized parts in the SID.
2008-05-06 12:16:02 +02:00
Volker Lendecke
36bfd32f1f
Remove unix_homedir from struct user_struct
...
This makes pdb_get_unix_homedir unused. I wonder if that was ever really used...
2008-05-05 18:28:58 +02:00
Stefan Metzmacher
baaf571d54
pdb_tdb: fix the upgrade code, db_traverse returns the number of records!
...
metze
2008-04-15 00:25:11 +02:00
Volker Lendecke
dead193f46
Convert dbwrap_trans_delete to NTSTATUS
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-04-01 14:04:22 +02:00
Volker Lendecke
5f4de856af
Convert dbwrap_trans_store to NTSTATUS
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-04-01 14:04:22 +02:00
Stefan Metzmacher
d4826a0136
pdb_tdb: use != 0 instead off == -1 for dbwrap functions
...
metze
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
9322442510
passdb: guard pdb_generate_sam_sid() with a transaction
...
This prevents possible races with some dbwrap backends
metze
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
986bc7e8b2
passdb/secrets: add secrets_db_ctx() to get the db_context
...
metze
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
9925cc01a2
pdb_tdb: use db_open_trans()
...
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-03-27 18:14:57 +01:00
Stefan Metzmacher
3bf9ab640e
pdb_tdb: use db_sam->transaction_start(db_sam) != 0 consistent
...
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-03-27 18:14:57 +01:00
Stefan Metzmacher
b61b8ca494
passdb/secrets: use db_open_trans()
...
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-03-27 18:14:57 +01:00
Stefan Metzmacher
729f7b9ff3
passdb/secrets: it's enough to use traverse_read() in secrets_trusted_domains()
...
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-03-27 18:14:56 +01:00
Marc VanHeyningen
3fc85d2259
Coverity fixes
2008-03-17 20:52:25 +01:00
Volker Lendecke
948ab77863
Convert pdb_tdb to use dbwrap
2008-03-17 11:51:50 +01:00
Volker Lendecke
1dd8fa9a52
Fix bug 4901
2008-03-14 18:01:23 +01:00
Volker Lendecke
9d30e5991c
Convert secrets.c to use dbwrap
2008-03-11 17:09:19 +01:00
Volker Lendecke
f94a63cd8f
Use a separate tdb for mutexes
...
Another preparation to convert secrets.c to dbwrap: The dbwrap API does not
provide a sane tdb_lock_with_timeout abstraction. In the clustered case the DC
mutex is needed per-node anyway, so it is perfectly fine to use a local mutex
only.
2008-03-10 21:08:45 +01:00
Volker Lendecke
1307f0130c
Convert secrets_lock_trust_account_password to talloc
...
This is preparing the conversion of secrets.c to ctdb
2008-03-10 21:08:45 +01:00
Volker Lendecke
3ac4f935c0
Make use of talloc_asprintf_strupper_m in secrets.c
2008-03-10 09:52:08 +01:00
Volker Lendecke
8725dbc888
Avoid some pointless checks
...
secrets_init() makes sure that the tdb is initialized
2008-03-10 09:51:58 +01:00
Volker Lendecke
27065382d9
Use talloc_tos() in secrets_init
2008-03-10 09:51:51 +01:00
Volker Lendecke
86cabcad74
Fix a memleak -- Coverity ID 222
...
(cherry picked from commit a40781bafa3a8f0c7737164bca6cf74b0a452e72)
2008-03-05 18:44:26 +01:00
Günther Deschner
0d73bde6de
Fix crash bug in pdb_init_ldapsam().
...
Karolin, this needs to be in 3-2-stable.
Guenther
2008-03-04 11:03:35 +01:00
Volker Lendecke
ad37b7b0ae
Fix some warnings
...
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
2008-02-25 16:09:26 +01:00
Karolin Seeger
e5cc8b683c
Change ldap search filter. This function is also used to search machine accounts which may be located in a different ou. This is an extension to e71a48bb80cee85afcccacbce2884c0d600f4d72.
...
Karolin
2008-02-19 12:35:54 +01:00
Günther Deschner
92fca97951
Use netr_SamInfo3 in remaining places.
...
Guenther
2008-02-17 02:12:01 +01:00
Stefan Metzmacher
5f623f54a9
nsswitch: convert winbind_env_set(), winbind_on() and winbind_off() into macros
...
metze
2008-02-13 10:44:52 +01:00
Günther Deschner
e1bcb7d82f
Add get_logon_hours_from_pdb() (inspired by samba4).
...
Guenther
2008-02-12 14:52:25 +01:00
Karolin Seeger
e71a48bb80
Change ldap search filter. This function is also used to search machine accounts which may be organized in a different ou.
...
Karolin
2008-02-11 10:03:47 +01:00
Günther Deschner
5e60852bae
More paranoid checks for secrets_init() success.
...
Guenther
2008-02-09 02:05:39 +01:00
Karolin Seeger
53b83bb53f
Fix typo.
...
Karolin
2008-02-08 10:05:47 +01:00
Jeremy Allison
21594cb34c
Don't return true on talloc fail.
...
Jeremy.
2008-02-05 18:05:59 -08:00
Volker Lendecke
c9472ae610
Fix valgrind errors
...
We need to keep the names around on the search. Probably a tdb_move would do it
here as well, but RPC is not the fastest thing on earth anyway...
Thanks to Günther for pointing that out to me!
2008-02-04 19:41:04 +01:00
Volker Lendecke
5223d18ea2
Remove a static
...
I very much doubt that this is called enough to justify a global. If this turns
out to be a hot code path, we might reconsider :-)
2008-02-04 19:40:08 +01:00
Michael Adam
c0d9732cf4
Fix lookup_sids to detect unix_groups and unix_users domain sids.
...
This fixes panics in wbcLookupRids when 1-2-22 was passed as a
domain sid.
Michael
2008-01-25 01:42:22 +01:00
Michael Adam
6c7c6c3f85
Add a debug message: show the sid lookup_sid() was called for.
...
Michael
2008-01-25 01:42:22 +01:00
Michael Adam
723e877c24
Add a debug message to lookup_rids() printing the domain SID.
...
This is to ease debugging. I sporadically get panics that are
apparently due to NULL domain sid passed to lookup_rids somewhere.
Michael
2008-01-25 01:42:22 +01:00
Jeremy Allison
c79e9414c4
Fix CID 469. new_acct can't be NULL here.
...
Jeremy.
2008-01-12 00:09:35 -08:00
Michael Adam
d7a7b79320
Fix memleak in ldapsam_rename_sam_account() found by IBM checker.
...
The check for out of memory was the wrong way round.
Michael
2008-01-09 22:09:55 +01:00
Michael Adam
6b2b9a60ef
Convert add_sid_to_array() add_sid_to_array_unique() to return NTSTATUS.
...
Michael
2008-01-09 01:47:10 +01:00
Günther Deschner
dd3fbd93b6
Add secrets_shutdown().
...
Guenther
2008-01-07 12:48:21 +01:00
Jeremy Allison
9369d6e907
Fix for bug #5163 from Laurent Pinchart <pinchart@skynet.be>
...
Failure to change password in ldap is mapped to NT_STATUS_UNSUCCESSFUL unconditionally.
Jeremy.
2008-01-02 18:20:23 -08:00