summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-05-21 19:12:14 +0000
committerGerald Carter <jerry@samba.org>2007-05-21 19:12:14 +0000
commitbb54d7f722544a1b2de2deef0ce8c336361396d4 (patch)
tree6df20fb3e7f61cd9c66edb72dba1566aa250aaff /source
parent42ade96f93b47bf14de754b6ca2de341104aecd2 (diff)
downloadsamba-bb54d7f722544a1b2de2deef0ce8c336361396d4.tar.gz
samba-bb54d7f722544a1b2de2deef0ce8c336361396d4.tar.xz
samba-bb54d7f722544a1b2de2deef0ce8c336361396d4.zip
r23046: Few missing merges from cleaning out the Centeris winbindd tree.
Nothing of major interest. Will fix a few problems with one way trusts.
Diffstat (limited to 'source')
-rw-r--r--source/nsswitch/winbindd.c4
-rw-r--r--source/nsswitch/winbindd_rpc.c6
-rw-r--r--source/nsswitch/winbindd_util.c10
-rw-r--r--source/passdb/pdb_interface.c2
4 files changed, 21 insertions, 1 deletions
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c
index ba985f5b2b6..acf487a6f4f 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/nsswitch/winbindd.c
@@ -1111,6 +1111,10 @@ int main(int argc, char **argv, char **envp)
wcache_tdc_clear();
+ /* clear the cached list of trusted domains */
+
+ wcache_tdc_clear();
+
if (!init_domain_list()) {
DEBUG(0,("unable to initalize domain list\n"));
exit(1);
diff --git a/source/nsswitch/winbindd_rpc.c b/source/nsswitch/winbindd_rpc.c
index ee8044a6678..4a6448348e9 100644
--- a/source/nsswitch/winbindd_rpc.c
+++ b/source/nsswitch/winbindd_rpc.c
@@ -458,6 +458,12 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
return NT_STATUS_OK;
}
+ if ( !winbindd_can_contact_domain( domain ) ) {
+ DEBUG(10,("query_user: No incoming trust for domain %s\n",
+ domain->name));
+ return NT_STATUS_OK;
+ }
+
/* no cache; hit the wire */
result = cm_connect_sam(domain, mem_ctx, &cli, &dom_pol);
diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c
index 753e1da3c4c..2d744ebcd8b 100644
--- a/source/nsswitch/winbindd_util.c
+++ b/source/nsswitch/winbindd_util.c
@@ -157,6 +157,16 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
return domain;
}
+ /* See if we found a match. Check if we need to update the
+ SID. */
+
+ if ( domain ) {
+ if ( sid_equal( &domain->sid, &global_sid_NULL ) )
+ sid_copy( &domain->sid, sid );
+
+ return domain;
+ }
+
/* Create new domain entry */
if ((domain = SMB_MALLOC_P(struct winbindd_domain)) == NULL)
diff --git a/source/passdb/pdb_interface.c b/source/passdb/pdb_interface.c
index cff13de0adb..205c37d68ed 100644
--- a/source/passdb/pdb_interface.c
+++ b/source/passdb/pdb_interface.c
@@ -1289,7 +1289,7 @@ static BOOL pdb_default_sid_to_id(struct pdb_methods *methods,
goto done;
}
- /* check for "Unix User" */
+ /* check for "Unix Group" */
if ( sid_peek_check_rid(&global_sid_Unix_Groups, sid, &rid) ) {
id->gid = rid;