diff options
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. */ |