Volker Lendecke
fcdfff1cc8
Convert dbwrap_trans_store to NTSTATUS
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 5f4de856af
)
2008-04-01 14:04:22 +02:00
Stefan Metzmacher
8957f6b0cf
pdb_tdb: use != 0 instead off == -1 for dbwrap functions
...
metze
(This used to be commit d4826a0136
)
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
663eb087e6
passdb: guard pdb_generate_sam_sid() with a transaction
...
This prevents possible races with some dbwrap backends
metze
(This used to be commit 9322442510
)
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
a5f3911d70
passdb/secrets: add secrets_db_ctx() to get the db_context
...
metze
(This used to be commit 986bc7e8b2
)
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
dbd2e3860d
pdb_tdb: use db_open_trans()
...
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 9925cc01a2
)
2008-03-27 18:14:57 +01:00
Stefan Metzmacher
7d413b8bee
pdb_tdb: use db_sam->transaction_start(db_sam) != 0 consistent
...
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 3bf9ab640e
)
2008-03-27 18:14:57 +01:00
Stefan Metzmacher
4b2ce410a5
passdb/secrets: use db_open_trans()
...
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit b61b8ca494
)
2008-03-27 18:14:57 +01:00
Stefan Metzmacher
3b0592bc15
passdb/secrets: it's enough to use traverse_read() in secrets_trusted_domains()
...
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 729f7b9ff3
)
2008-03-27 18:14:56 +01:00
Marc VanHeyningen
e06aa46b9f
Coverity fixes
...
(This used to be commit 3fc85d2259
)
2008-03-17 20:52:25 +01:00
Volker Lendecke
88ee949777
Convert pdb_tdb to use dbwrap
...
(This used to be commit 948ab77863
)
2008-03-17 11:51:50 +01:00
Volker Lendecke
f3856d074f
Fix bug 4901
...
(This used to be commit 1dd8fa9a52
)
2008-03-14 18:01:23 +01:00
Volker Lendecke
28244425b2
Convert secrets.c to use dbwrap
...
(This used to be commit 9d30e5991c
)
2008-03-11 17:09:19 +01:00
Volker Lendecke
1ebfc66b2c
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.
(This used to be commit f94a63cd8f
)
2008-03-10 21:08:45 +01:00
Volker Lendecke
d634ab06b3
Convert secrets_lock_trust_account_password to talloc
...
This is preparing the conversion of secrets.c to ctdb
(This used to be commit 1307f0130c
)
2008-03-10 21:08:45 +01:00
Volker Lendecke
b175ffa702
Make use of talloc_asprintf_strupper_m in secrets.c
...
(This used to be commit 3ac4f935c0
)
2008-03-10 09:52:08 +01:00
Volker Lendecke
2e8d375346
Avoid some pointless checks
...
secrets_init() makes sure that the tdb is initialized
(This used to be commit 8725dbc888
)
2008-03-10 09:51:58 +01:00
Volker Lendecke
c2cd0e3c54
Use talloc_tos() in secrets_init
...
(This used to be commit 27065382d9
)
2008-03-10 09:51:51 +01:00
Volker Lendecke
9d7cad7e82
Fix a memleak -- Coverity ID 222
...
(cherry picked from commit a40781bafa3a8f0c7737164bca6cf74b0a452e72)
(This used to be commit 86cabcad74
)
2008-03-05 18:44:26 +01:00
Günther Deschner
2c5e04b1f7
Fix crash bug in pdb_init_ldapsam().
...
Karolin, this needs to be in 3-2-stable.
Guenther
(This used to be commit 0d73bde6de
)
2008-03-04 11:03:35 +01:00
Volker Lendecke
3176392878
Fix some warnings
...
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
(This used to be commit ad37b7b0ae
)
2008-02-25 16:09:26 +01:00
Karolin Seeger
cdb88dcf6b
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 e71a48bb80
.
...
Karolin
(This used to be commit e5cc8b683c
)
2008-02-19 12:35:54 +01:00
Günther Deschner
7dfeae6073
Use netr_SamInfo3 in remaining places.
...
Guenther
(This used to be commit 92fca97951
)
2008-02-17 02:12:01 +01:00
Stefan Metzmacher
cedfcaec0c
nsswitch: convert winbind_env_set(), winbind_on() and winbind_off() into macros
...
metze
(This used to be commit 5f623f54a9
)
2008-02-13 10:44:52 +01:00
Günther Deschner
e4501b0913
Add get_logon_hours_from_pdb() (inspired by samba4).
...
Guenther
(This used to be commit e1bcb7d82f
)
2008-02-12 14:52:25 +01:00
Karolin Seeger
cd50bc575e
Change ldap search filter. This function is also used to search machine accounts which may be organized in a different ou.
...
Karolin
(This used to be commit e71a48bb80
)
2008-02-11 10:03:47 +01:00
Günther Deschner
7ec5bfc49f
More paranoid checks for secrets_init() success.
...
Guenther
(This used to be commit 5e60852bae
)
2008-02-09 02:05:39 +01:00
Karolin Seeger
932ec38a87
Fix typo.
...
Karolin
(This used to be commit 53b83bb53f
)
2008-02-08 10:05:47 +01:00
Jeremy Allison
8b3004bcf9
Don't return true on talloc fail.
...
Jeremy.
(This used to be commit 21594cb34c
)
2008-02-05 18:05:59 -08:00
Volker Lendecke
a31d5e49fe
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!
(This used to be commit c9472ae610
)
2008-02-04 19:41:04 +01:00
Volker Lendecke
c246eeb6f1
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 :-)
(This used to be commit 5223d18ea2
)
2008-02-04 19:40:08 +01:00
Michael Adam
76e5c1f79a
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
(This used to be commit c0d9732cf4
)
2008-01-25 01:42:22 +01:00
Michael Adam
60daaeeb34
Add a debug message: show the sid lookup_sid() was called for.
...
Michael
(This used to be commit 6c7c6c3f85
)
2008-01-25 01:42:22 +01:00
Michael Adam
d682e04828
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
(This used to be commit 723e877c24
)
2008-01-25 01:42:22 +01:00
Jeremy Allison
aa8818bcc3
Fix CID 469. new_acct can't be NULL here.
...
Jeremy.
(This used to be commit c79e9414c4
)
2008-01-12 00:09:35 -08:00
Michael Adam
7c6d77dd88
Fix memleak in ldapsam_rename_sam_account() found by IBM checker.
...
The check for out of memory was the wrong way round.
Michael
(This used to be commit d7a7b79320
)
2008-01-09 22:09:55 +01:00
Michael Adam
f3603d5a5a
Convert add_sid_to_array() add_sid_to_array_unique() to return NTSTATUS.
...
Michael
(This used to be commit 6b2b9a60ef
)
2008-01-09 01:47:10 +01:00
Günther Deschner
c0d33508ff
Add secrets_shutdown().
...
Guenther
(This used to be commit dd3fbd93b6
)
2008-01-07 12:48:21 +01:00
Jeremy Allison
cfcdeb52bf
Fix for bug #5163 from Laurent Pinchart <pinchart@skynet.be>
...
Failure to change password in ldap is mapped to NT_STATUS_UNSUCCESSFUL unconditionally.
Jeremy.
(This used to be commit 9369d6e907
)
2008-01-02 18:20:23 -08:00
Michael Adam
df450fc090
Make pdb_tdb honour a private dir overridden in smb.conf.
...
One lp_private_dir() has to be used instead of get_dyn_PRIVATE_DIR()
to determine the location of the passdb.tdb.
I noticed this when running make test as a "normal user" from a
build, where I had done "make install" as root before, and so
the passdb.tdb could not be accessed during the startup phase
"CREATE TEST ENVIRONMENT IN ./st ..." in selftest.sh.
Michael
(This used to be commit 1f96389afa
)
2007-12-29 21:38:39 -08:00
Volker Lendecke
40bf6730aa
passdb.tdb is located in the private directory
...
Jerry, as part of d6cdbfd87
the default location of passdb.tdb has changed from
the private directory to the state directory. I think because passdb.tdb holds
the password hashes, it is reasonable to keep this next to the smbpasswd file.
Please review and potentially push.
Thanks,
Volker
(This used to be commit c9c7607c40
)
2007-12-29 01:01:47 -08:00
Volker Lendecke
3c99b7773e
Convert csamuser to memcache
...
(This used to be commit 476d3abf9c
)
2007-12-28 13:13:29 +01:00
Volker Lendecke
e70c97ef85
Remove the sampwent interface
...
(This used to be commit 9e80b969fb
)
2007-12-26 18:57:15 +01:00
Volker Lendecke
f633d348d7
smbpasswd_search_users
...
(This used to be commit 84af4fb656
)
2007-12-26 18:57:14 +01:00
Volker Lendecke
533c7c81fe
Add tdbsam_search_users
...
(This used to be commit 02f0b0bd39
)
2007-12-26 18:57:14 +01:00
Volker Lendecke
a55a08a217
Convert the [gu]id_sid cache to memcache
...
(This used to be commit 4baf36784f
)
2007-12-23 12:43:29 +01:00
Volker Lendecke
e518e19bc0
Remove Get_Pwnam and its associated static variable
...
All callers are replaced by Get_Pwnam_alloc
(This used to be commit 735f593154
)
2007-12-19 21:09:10 +01:00
Günther Deschner
d0cd32e2c8
Add and use some keystr functions using talloc_tos() in secrets api.
...
Guenther
(This used to be commit 6ccbf67a0c
)
2007-12-19 11:15:17 +01:00
Michael Adam
a3081ba5b5
Prevent another segfault.
...
Michael
(This used to be commit 0a9874c1c7
)
2007-12-18 01:30:52 +01:00
Michael Adam
9f5a16a22d
Remove direct caller of secrets_fetch_trusted_domain_password().
...
This is a regession introduced by f7efc0eca9
.
This calls pdb_get_trusteddom_pw() instead, again.
Michael
(This used to be commit 91be824d2b
)
2007-12-17 14:51:37 +01:00
Michael Adam
81327b1613
Fix for bug #4801 : Correctly implement lsa lookup levels for lookupnames.
...
This patch is still incomplete in that winbindd does not walk
the the trusted domains to lookup unqualified names here.
Apart from that this fix should be pretty much complete.
Michael
(This used to be commit f7efc0eca9
)
2007-12-17 13:06:13 +01:00