diff options
author | Gerald Carter <jerry@samba.org> | 2003-07-16 02:20:53 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-07-16 02:20:53 +0000 |
commit | a84270ce115e7fa0674c163de708333816184dca (patch) | |
tree | fbad9af11ddfae189f1dd003590f50dbb4407c47 /source3/nsswitch | |
parent | 6b814c9908c307abf427af37c00332de5e369eb4 (diff) | |
download | samba-a84270ce115e7fa0674c163de708333816184dca.tar.gz samba-a84270ce115e7fa0674c163de708333816184dca.tar.bz2 samba-a84270ce115e7fa0674c163de708333816184dca.zip |
fixes for 'net rpc vampire'. I can now take a blank Samba host
and migrate an NT4 domain and still logon from domain members
(tested logon scripts, system policies, profiles, & home directories)
(passdb backend = tdbsam)
removed call to idmap_init_wellknown_sids() from winbindd.c
since the local domain should be handled by the guest passdb backend
(and you don't really always want the Administrator account to be root)
...and we didn't pay attention to this anyways now.
(This used to be commit 837d7c54d3ca780160aa0d6a2f0a109bb691948e)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/wb_client.c | 35 | ||||
-rw-r--r-- | source3/nsswitch/winbindd.c | 3 |
2 files changed, 21 insertions, 17 deletions
diff --git a/source3/nsswitch/wb_client.c b/source3/nsswitch/wb_client.c index 49a48074fa..7c5a8dd054 100644 --- a/source3/nsswitch/wb_client.c +++ b/source3/nsswitch/wb_client.c @@ -315,6 +315,9 @@ BOOL winbind_create_user( const char *name, uint32 *rid ) DEBUG(10,("winbind_create_user: %s\n", name)); + ZERO_STRUCT(request); + ZERO_STRUCT(response); + /* see if the caller wants a new RID returned */ if ( rid ) @@ -323,8 +326,6 @@ BOOL winbind_create_user( const char *name, uint32 *rid ) fstrcpy( request.data.acct_mgt.username, name ); fstrcpy( request.data.acct_mgt.groupname, "" ); - ZERO_STRUCT(response); - result = winbindd_request( WINBINDD_CREATE_USER, &request, &response); if ( rid ) @@ -351,6 +352,9 @@ BOOL winbind_create_group( const char *name, uint32 *rid ) DEBUG(10,("winbind_create_group: %s\n", name)); + ZERO_STRUCT(request); + ZERO_STRUCT(response); + /* see if the caller wants a new RID returned */ if ( rid ) @@ -358,7 +362,6 @@ BOOL winbind_create_group( const char *name, uint32 *rid ) fstrcpy( request.data.acct_mgt.groupname, name ); - ZERO_STRUCT(response); result = winbindd_request( WINBINDD_CREATE_GROUP, &request, &response); @@ -384,14 +387,15 @@ BOOL winbind_add_user_to_group( const char *user, const char *group ) if ( !user || !group ) return False; + ZERO_STRUCT(request); + ZERO_STRUCT(response); + DEBUG(10,("winbind_add_user_to_group: user(%s), group(%s) \n", user, group)); fstrcpy( request.data.acct_mgt.username, user ); fstrcpy( request.data.acct_mgt.groupname, group ); - ZERO_STRUCT(response); - result = winbindd_request( WINBINDD_ADD_USER_TO_GROUP, &request, &response); return result == NSS_STATUS_SUCCESS; @@ -413,12 +417,12 @@ BOOL winbind_remove_user_from_group( const char *user, const char *group ) if ( !user || !group ) return False; + ZERO_STRUCT(request); + ZERO_STRUCT(response); + DEBUG(10,("winbind_remove_user_from_group: user(%s), group(%s) \n", user, group)); - fstrcpy( request.data.acct_mgt.username, user ); - fstrcpy( request.data.acct_mgt.groupname, group ); - ZERO_STRUCT(response); result = winbindd_request( WINBINDD_REMOVE_USER_FROM_GROUP, &request, &response); @@ -442,14 +446,15 @@ BOOL winbind_set_user_primary_group( const char *user, const char *group ) if ( !user || !group ) return False; + ZERO_STRUCT(request); + ZERO_STRUCT(response); + DEBUG(10,("winbind_set_user_primary_group: user(%s), group(%s) \n", user, group)); fstrcpy( request.data.acct_mgt.username, user ); fstrcpy( request.data.acct_mgt.groupname, group ); - ZERO_STRUCT(response); - result = winbindd_request( WINBINDD_SET_USER_PRIMARY_GROUP, &request, &response); return result == NSS_STATUS_SUCCESS; @@ -472,12 +477,13 @@ BOOL winbind_delete_user( const char *user ) if ( !user ) return False; + ZERO_STRUCT(request); + ZERO_STRUCT(response); + DEBUG(10,("winbind_delete_user: user (%s)\n", user)); fstrcpy( request.data.acct_mgt.username, user ); - ZERO_STRUCT(response); - result = winbindd_request( WINBINDD_DELETE_USER, &request, &response); return result == NSS_STATUS_SUCCESS; @@ -499,12 +505,13 @@ BOOL winbind_delete_group( const char *group ) if ( !group ) return False; + ZERO_STRUCT(request); + ZERO_STRUCT(response); + DEBUG(10,("winbind_delete_group: group (%s)\n", group)); fstrcpy( request.data.acct_mgt.groupname, group ); - ZERO_STRUCT(response); - result = winbindd_request( WINBINDD_DELETE_GROUP, &request, &response); return result == NSS_STATUS_SUCCESS; diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index 0336312e89..0860d701d8 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -883,9 +883,6 @@ int main(int argc, char **argv) if (!idmap_init(lp_idmap_backend())) return 1; - if (!idmap_init_wellknown_sids()) - exit(1); - /* Unblock all signals we are interested in as they may have been blocked by the parent process. */ |