summaryrefslogtreecommitdiffstats
path: root/source3/winbindd
Commit message (Collapse)AuthorAgeFilesLines
* s3: Fix a bad memleak in winbindVolker Lendecke2010-03-221-1/+2
|
* s3: Fix a long-standing problem with recycled PIDsVolker Lendecke2010-03-102-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* s3:winbindd: add DEBUG(10,...) for the end of each top levelStefan Metzmacher2010-03-052-6/+25
| | | | | | That will hopefully make debugging a bit easier (at least for me). metze
* s3: Fix unnecessary traversing winbindd_cache.tdb in SIGHUP handler.Bo Yang2010-03-061-0/+6
| | | | Signed-off-by: Bo Yang <boyang@samba.org>
* s3: Remove unused count_all_current_connections()Volker Lendecke2010-02-281-1/+0
|
* s3: Fix but 7145 -- duplicate sam and unix accountsVolker Lendecke2010-02-282-0/+22
| | | | | | | | | | For me this survives the TESTS=posix_s3 POSIX_SUBTESTS="RPC-SAMR-LARGE-DC LOCAL-NSS-WRAPPER" make test reproducer. Günther, please check! Volker
* Fix one of the valgrind warnings from bug #6814 - Fixes for problems ↵Roel van Meer2010-02-261-0/+8
| | | | | | | reported by valgrind The timeval passed to event_add_to_select_args() must be initialized as event_add_to_select_args() uses a timeval_min() on this and next_event.
* s3 move the sitename cache in its own fileSimo Sorce2010-02-231-0/+1
|
* s3: Consolidate server_id_self into the equivalent procid_self()Volker Lendecke2010-02-231-1/+1
|
* s3:winbindd: never mark external domains as internal!Stefan Metzmacher2010-02-231-4/+1
| | | | | | | | | This way we can endup with silently using builtin_passdb_methods for an ad domain without an inbound trust. This fixes bug #7170. metze
* s3: go straight to winbindd_dual_pam_auth() in case of !NT_STATUS_OKLars Müller2010-02-171-1/+1
| | | | | | At the formerly used process_result statement we have alone one NT_STATUS_IS_OK() which never could be hit in our case as we only go here if NT_STATUS_EQUAL is not ok.
* s3: Don't invalidate cache for uninitialized domains.Bo Yang2010-02-093-1/+52
| | | | Signed-off-by: Bo Yang <boyang@samba.org>
* s3/winbind_ccache: Fix typo in debug message.Karolin Seeger2010-01-281-1/+1
| | | | Karolin
* s3: Add the session key to the ccache_ntlm_auth responseVolker Lendecke2010-01-241-4/+18
|
* s3: Add wbinfo --ccache-saveVolker Lendecke2010-01-244-0/+80
| | | | | With this command you can give winbind your password for later use by the automatic ntlm_auth
* s3 winbindd: Return number of groups in data.num_entries for ↵Kai Blin2010-01-141-1/+3
| | | | | | | | | WINBINDD_LIST_GROUPS This allows to test if there's something wrong with the group list in extra_data or if there's simply no groups in the database. Volker, please check.
* s3 winbindd: Get WINBINDD_CHECK_MACHACC torture test to work again.Kai Blin2010-01-141-1/+4
| | | | | WINBINDD_CHECK_MACHACC used to report an NTSTATUS error and appropriate error strings. Make this work again.
* s3: Fix a winbind segfault in "trusted_domains"Volker Lendecke2010-01-131-3/+4
| | | | | | | We have to initialize domain->backend by calling "get_cache" before doing a query Thanks to Christian Ambach to find this :-)
* s3: Fix some nonempty blank linesVolker Lendecke2010-01-102-6/+6
|
* s3: Replace most calls to sid_append_rid() by sid_compose()Volker Lendecke2010-01-106-13/+8
|
* s3: Remove a pointless "else" branch from add_ccache_to_list()Volker Lendecke2010-01-091-4/+3
|
* s3: Slightly simplify winbindd_store_credsVolker Lendecke2010-01-091-4/+2
|
* s3: Fix a segfault in winbindd_dual_ccache_ntlm_auth()Volker Lendecke2010-01-091-1/+1
| | | | | | ntlmssp_update allocates the reply_blob as a child of ntlmssp_state. This means with ntlmss_end() it will be gone. winbindd_dual_ccache_ntlm_auth used the blob after the ntlmssp_end().
* s3: List trusted domains from wcache when domain is offline.Bo Yang2010-01-061-24/+139
| | | | Signed-off-by: Bo Yang <boyang@samba.org>
* s3: Make winbindd_cache.c aware of domain offline to avoid unnecessary ↵Bo Yang2010-01-062-4/+265
| | | | | | backend query. Signed-off-by: Bo Yang <boyang@samba.org>
* s3: Fix infinite loop in NCACN_IP_TCP asa there is no timeout. Assume ↵Bo Yang2010-01-062-9/+4
| | | | | | lsa_pipe_tcp is ok but network is down, then send request is ok, but select() on writeable fds loops forever since there is no response. Signed-off-by: Bo Yang <boyang@samba.org>
* s3: Slightly simplify winbindd_dual_ccache_ntlm_authVolker Lendecke2010-01-031-15/+9
| | | | data_blob_const can't fail
* s3: Fix a typoVolker Lendecke2010-01-021-1/+1
|
* s3: simplify find_root_domain, find_our_domain() never failsVolker Lendecke2010-01-021-4/+2
|
* s3: Use global_sid_Builtin in find_builtin_domainVolker Lendecke2010-01-021-4/+1
|
* s3: Avoid adding a domain twiceVolker Lendecke2010-01-021-6/+7
| | | | If we found a match with sid==NULL, we ended up adding the domain twice
* s3: Make free_domain_list() staticVolker Lendecke2010-01-022-2/+1
|
* s3: Introduce domain_is_forest_root() helper functionVolker Lendecke2010-01-023-8/+12
| | | | Hopefully this makes the flag tests a bit more understandable
* Prevent NULL dereference if group has no membersJim McDonough2009-12-301-4/+4
|
* s3: Check for lp_winbind_trusted_domains_only in wb_gettoken()Volker Lendecke2009-12-282-24/+7
| | | | This avoids one walk of the domain list
* s3: Move a lp_winbind_trusted_domains_only() check to wb_getgrsid()Volker Lendecke2009-12-282-22/+12
| | | | winbindd_getgrgid was not protected by this.
* s3: Pass netr_DomainTrustList instead of names and sids through ↵Volker Lendecke2009-12-287-182/+98
| | | | (*trusted_domains)
* s3: Simplify winbindd_ads.c:trusted_domains()Volker Lendecke2009-12-281-110/+123
| | | | | | | | | | | | | | | No real code change, this just removes an indentation by turning if ( NT_STATUS_IS_OK(result) && trusts.count) { into if (!NT_STATUS_IS_OK(result)) { return result; } if (trusts.count == 0) { return NT_STATUS_OK; }
* s3: Remove some unused codeVolker Lendecke2009-12-281-101/+0
| | | | Watch the #if 0 -- we never stored this in the cache anymore
* s3: Simplify winbindd_list_trusted_domains() slightlyVolker Lendecke2009-12-281-31/+23
|
* s3: Simplify "setup_domain_child" slightlyVolker Lendecke2009-12-282-3/+1
|
* s3:winbind Make the normal client exit message a bit more understandableVolker Lendecke2009-12-261-2/+7
|
* s3: Fix a typo found by Matthias Dieter Wallnöfer <mdw@samba.org> -- thanks :-)Volker Lendecke2009-12-261-1/+1
|
* s3: Fix a bogus uninitialized variable warningVolker Lendecke2009-12-261-1/+1
|
* s3: Replace IS_DOMAIN_OFFLINE by a functionVolker Lendecke2009-12-266-9/+16
|
* s3: Fix some nonempty blank linesVolker Lendecke2009-12-261-2/+2
|
* s3: winbindd_cli_state->getgrent_state is no longer usedVolker Lendecke2009-12-264-39/+0
|
* s3: getgrent_state has been replaced by grent_stateVolker Lendecke2009-12-261-1/+1
|
* s3: wbinfo --ping-dc is not cacheableVolker Lendecke2009-12-231-0/+1
|
* s3: Remove some unused codeVolker Lendecke2009-12-234-164/+0
|