summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_group.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-03-15 03:46:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:29 -0500
commit8723178048f3b98938476c41679d46ed1f809515 (patch)
tree622b7f5ecb2d8bc69f20156343ad141b6cb8c1eb /source3/nsswitch/winbindd_group.c
parenta48baaa9351c42a6a9998914e172475b7d3bbf7f (diff)
downloadsamba-8723178048f3b98938476c41679d46ed1f809515.tar.gz
samba-8723178048f3b98938476c41679d46ed1f809515.tar.bz2
samba-8723178048f3b98938476c41679d46ed1f809515.zip
r14421: This does two things
* Automatically creates the BUILTIN\Users group similar to how BUILTIN\Administrators is done. This code does need to be cleaned up considerably. I'll continue to work on this. * The important fix is for getusergroups() when dealing with a local user and nested groups. Now I can run the following successfully: $ su - jerry -c groups users BUILTIN\users (This used to be commit f54d911e686ffd68ddc6dbc073987b9d8eb2fa5b)
Diffstat (limited to 'source3/nsswitch/winbindd_group.c')
-rw-r--r--source3/nsswitch/winbindd_group.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index 6e7a242379..547f4f2ec8 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -997,8 +997,16 @@ void winbindd_getgroups(struct winbindd_cli_state *state)
&s->domname, &s->username)) {
DEBUG(5, ("Could not parse domain user: %s\n",
state->request.data.username));
- request_error(state);
- return;
+
+ /* error out if we do not have nested group support */
+
+ if ( !lp_winbind_nested_groups() ) {
+ request_error(state);
+ return;
+ }
+
+ s->domname = talloc_strdup( state->mem_ctx, get_global_sam_name() );
+ s->username = talloc_strdup( state->mem_ctx, state->request.data.username );
}
/* Get info for the domain */