summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_cache.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-05-06 20:16:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:21:49 -0500
commit391a72f3dfc061d6d97752c7e8691f80b4990ba8 (patch)
treef9d596fb1fe072365f192fdf20751fd277731c1d /source3/nsswitch/winbindd_cache.c
parent044f1b4a993cd7711fd9721a73cf9e2f9c90f5a5 (diff)
downloadsamba-391a72f3dfc061d6d97752c7e8691f80b4990ba8.tar.gz
samba-391a72f3dfc061d6d97752c7e8691f80b4990ba8.tar.bz2
samba-391a72f3dfc061d6d97752c7e8691f80b4990ba8.zip
r22710: Support one-way trusts.
* Rely on the fact that name2sid will work for any name in a trusted domain will work against our primary domain (even in the absense of an incoming trust path) * Only logons will reliably work and the idmap backend is responsible for being able to manage id's without contacting the trusted domain * "getent passwd" and "getent group" for trusted users and groups will work but we cannot get the group membership of a user in any fashion without the user first logging on (via NTLM or krb5) and the netsamlogon_cache being updated. (This used to be commit dee2bce2af6aab8308dcef4109cc5248cfba5ef5)
Diffstat (limited to 'source3/nsswitch/winbindd_cache.c')
-rw-r--r--source3/nsswitch/winbindd_cache.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index 7538cddbdf..ceeb4988c2 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -483,9 +483,17 @@ static void refresh_sequence_number(struct winbindd_domain *domain, BOOL force)
goto done;
/* important! make sure that we know if this is a native
- mode domain or not */
+ mode domain or not. And that we can contact it. */
+
+ if ( winbindd_can_contact_domain( domain ) ) {
+ status = domain->backend->sequence_number(domain,
+ &domain->sequence_number);
+ } else {
+ /* just use the current time */
+ status = NT_STATUS_OK;
+ domain->sequence_number = time(NULL);
+ }
- status = domain->backend->sequence_number(domain, &domain->sequence_number);
/* the above call could have set our domain->backend to NULL when
* coming from offline to online mode, make sure to reinitialize the
@@ -2197,7 +2205,7 @@ void wcache_invalidate_cache(void)
}
}
-static BOOL init_wcache(void)
+BOOL init_wcache(void)
{
if (wcache == NULL) {
wcache = SMB_XMALLOC_P(struct winbind_cache);