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

152 Commits

Author SHA1 Message Date
Volker Lendecke
56b4aa3266 s3: Move the in-memory ccache to the parent
None of this blocks, so there is no reason to keep this in
a winbind child process
2010-04-19 14:27:24 +02:00
Volker Lendecke
45eeed2893 s3: Convert WINBINDD_PAM_LOGOFF to the new async API 2010-04-19 14:27:20 +02:00
Volker Lendecke
518a4f5423 s3: Convert WINBINDD_PAM_CHAUTHTOK to the new async API 2010-04-19 14:27:20 +02:00
Volker Lendecke
d869e7a0d8 s3: Convert WINBINDD_PAM_AUTH_CRAP to the new async API 2010-04-19 14:27:19 +02:00
Volker Lendecke
61ec0f571a s3: Convert WINBINDD_PAM_AUTH to the new async API 2010-04-19 14:27:19 +02:00
Volker Lendecke
3d5732fc13 s3: Remove the separate "child" argument from setup_domain_child() 2010-04-08 15:12:42 +02:00
Volker Lendecke
6d9b2e62cb s3: Make check_info3_in_group static 2010-03-31 21:03:07 +02:00
Volker Lendecke
cf4a8f7639 s3-winbind: Make append_auth_data() static 2010-03-31 21:03:06 +02:00
Volker Lendecke
89c785c47a s3: Fix a long-standing problem with recycled PIDs
When a samba server process dies hard, it has no chance to clean up its entries
in locking.tdb, brlock.tdb, connections.tdb and sessionid.tdb.

For locking.tdb and brlock.tdb Samba is robust by checking every time we read
an entry from the database if the corresponding process still exists. If it
does not exist anymore, the entry is deleted. This is not 100% failsafe though:
On systems with a limited PID space there is a non-zero chance that between the
smbd's death and the fresh access, the PID is recycled by another long-running
process. This renders all files that had been locked by the killed smbd
potentially unusable until the new process also dies.

This patch is supposed to fix the problem the following way: Every process ID
in every database is augmented by a random 64-bit number that is stored in a
serverid.tdb. Whenever we need to check if a process still exists we know its
PID and the 64-bit number. We look up the PID in serverid.tdb and compare the
64-bit number. If it's the same, the process still is a valid smbd holding the
lock. If it is different, a new smbd has taken over.

I believe this is safe against an smbd that has died hard and the PID has been
taken over by a non-samba process. This process would not have registered
itself with a fresh 64-bit number in serverid.tdb, so the old one still exists
in serverid.tdb. We protect against this case by the parent smbd taking care of
deregistering PIDs from serverid.tdb and the fact that serverid.tdb is
CLEAR_IF_FIRST.

CLEAR_IF_FIRST does not work in a cluster, so the automatic cleanup does not
work when all smbds are restarted. For this, "net serverid wipe" has to be run
before smbd starts up. As a convenience, "net serverid wipedbs" also cleans up
sessionid.tdb and connections.tdb.

While there, this also cleans up overloading connections.tdb with all the
process entries just for messaging_send_all().

Volker
2010-03-10 16:07:10 +01:00
Volker Lendecke
5c40aa59d7 s3: Remove unused count_all_current_connections() 2010-02-28 20:45:21 +01:00
Bo Yang
9fed9011ff s3: Don't invalidate cache for uninitialized domains.
Signed-off-by: Bo Yang <boyang@samba.org>
2010-02-09 17:06:14 +08:00
Volker Lendecke
7d18d058a1 s3: Add wbinfo --ccache-save
With this command you can give winbind your password for later use by
the automatic ntlm_auth
2010-01-24 20:32:16 +01:00
Volker Lendecke
22a4a000ce s3: Make free_domain_list() static 2010-01-02 12:09:05 +01:00
Volker Lendecke
d05e17f875 s3: Introduce domain_is_forest_root() helper function
Hopefully this makes the flag tests a bit more understandable
2010-01-02 12:09:05 +01:00
Volker Lendecke
634d084517 s3: Replace IS_DOMAIN_OFFLINE by a function 2009-12-26 12:26:07 +01:00
Volker Lendecke
03617df24d s3: winbindd_cli_state->getgrent_state is no longer used 2009-12-26 12:26:06 +01:00
Volker Lendecke
6dc924fcf3 s3: Remove some unused code 2009-12-23 12:02:19 +01:00
Volker Lendecke
40d4c31999 s3: Remove unused sendto_child() 2009-12-23 11:42:31 +01:00
Volker Lendecke
9b6b01aab6 s3:winbind: Add a lower-cost alternative to wbinfo -t: wbinfo --ping-dc
This just does a NULL RPC call through an existing NETLOGON connection. If
someone knows an operation that "just works" and does not return NOT_SUPPORTED,
please tell me :-)
2009-12-21 23:23:52 +01:00
Volker Lendecke
e7468fb129 s3: Shrink winbindd_proto.h a bit 2009-12-21 16:27:20 +01:00
Volker Lendecke
d534a5be49 s3: Remove unused get_sam_group_entries 2009-12-21 16:27:19 +01:00
Volker Lendecke
0a130daf74 s3: Remove unused winbindd_dual_getsidaliases 2009-12-21 16:27:19 +01:00
Volker Lendecke
9568c762ac s3: Remove unused winbindd_dual_getuserdomgroups 2009-12-21 16:27:19 +01:00
Volker Lendecke
958fdaf5c3 s3: Remove unused winbindd_dual_getdcname 2009-12-21 16:27:19 +01:00
Volker Lendecke
4f434e07e9 s3: Remove unused winbindd_dual_lookupname 2009-12-21 16:27:19 +01:00
Volker Lendecke
74b1a026d4 s3: Remove unused winbindd_dual_lookupsid 2009-12-21 16:27:19 +01:00
Volker Lendecke
a8875c5724 s3: Remove some unused dual functions 2009-12-21 16:27:19 +01:00
Volker Lendecke
4b84d75399 s3: Remove unused do_async 2009-12-21 16:27:19 +01:00
Volker Lendecke
3f98c2c7ab s3: Remove unused winbindd_gid2sid_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
93bcc348d2 s3: Remove unused winbindd_uid2sid_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
fb77442c2d s3: Remove unused winbindd_sid2gid_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
d40edae331 s3: Remove unused winbindd_sid2uid_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
2591a524c0 s3: Remove unused query_user_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
5156fa8c74 s3: Remove unused winbindd_getsidaliases_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
0c3e3b7ab0 s3: Remove unused winbindd_lookupname_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
ebcb28ca73 s3: Remove unused winbindd_lookupsid_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
3e3214fd91 s3:winbind: Move fillup_pw_field() as static to wb_fill_pwent.c 2009-10-17 17:13:02 +02:00
Günther Deschner
a3306e352d s3-winbindd: add wbint_ChangeMachineAccount implementation.
Guenther
2009-10-13 12:42:44 +02:00
Volker Lendecke
dc8538b405 s3:winbind: Make check_info3_in_group, sanitize its memory handling 2009-09-28 17:54:20 +02:00
Volker Lendecke
f18d0b036c s3:winbind: Make "check_request_flags" publically available 2009-09-28 17:54:20 +02:00
Volker Lendecke
def5bf57c5 s3:winbind: Sanitize the args for find_auth_domain: It only needs the flags 2009-09-28 17:54:20 +02:00
Volker Lendecke
93db77adcb s3:winbind: Make append_data publically available as append_auth_data 2009-09-28 17:54:20 +02:00
Günther Deschner
58f2deb940 s3-winbindd: add cm_connect_lsa_tcp().
Guenther
2009-09-22 11:38:06 +02:00
Günther Deschner
99c3fc1958 s3-winbindd: add and use winbindd_lookup_names().
Guenther
2009-09-17 08:54:31 +02:00
Günther Deschner
f0b52b8c31 s3-winbindd: add and use winbindd_lookup_sids().
Guenther
2009-09-17 08:54:19 +02:00
Volker Lendecke
04ea250aeb s3:winbind: Convert WINBINDD_SET_HWM to the new API 2009-09-07 01:28:32 +02:00
Volker Lendecke
4ad330d522 s3:winbind: Convert WINBINDD_REMOVE_MAPPING to the new API 2009-09-07 01:28:32 +02:00
Volker Lendecke
7159060450 s3:winbind: Convert WINBINDD_SET_MAPPING to the new API 2009-09-07 01:28:32 +02:00
Volker Lendecke
d9b7fd59b0 s3:winbind: Convert WINBINDD_CHECK_MACHACC to the new API 2009-09-07 01:28:32 +02:00
Volker Lendecke
1abf692312 s3:winbind: Make the pam_auth subfunctions static 2009-09-05 17:00:21 +02:00