diff options
Diffstat (limited to 'source3/auth/auth_util.c')
-rw-r--r-- | source3/auth/auth_util.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 30933c6c93..79205f1206 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -51,34 +51,6 @@ static int smb_create_user(const char *domain, const char *unix_username, const } /**************************************************************************** - Add and Delete UNIX users on demand, based on NTSTATUS codes. - We don't care about RID's here so ignore. -****************************************************************************/ - -void auth_add_user_script(const char *domain, const char *username) -{ - /* - * User validated ok against Domain controller. - * If the admin wants us to try and create a UNIX - * user on the fly, do so. - */ - - if ( *lp_adduser_script() ) - smb_create_user(domain, username, NULL); - else { - DEBUG(10,("auth_add_user_script: no 'add user script'. Asking winbindd\n")); - - /* should never get here is we a re a domain member running winbindd - However, a host set for 'security = server' might run winbindd for - account allocation */ - - if ( !winbind_create_user(username, NULL) ) { - DEBUG(5,("auth_add_user_script: winbindd_create_user() failed\n")); - } - } -} - -/**************************************************************************** Create a SAM_ACCOUNT - either by looking in the pdb, or by faking it up from unix info. ****************************************************************************/ @@ -1092,7 +1064,7 @@ struct passwd *smb_getpwnam( char *domuser, fstring save_username, BOOL create ) if (username[strlen(username)-1] == '$') return NULL; - auth_add_user_script(NULL, username); + smb_create_user(NULL, username, NULL); pw = Get_Pwnam(username); } @@ -1181,7 +1153,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, if (NT_STATUS_EQUAL(nt_status, NT_STATUS_NO_SUCH_USER)) { DEBUG(3,("User %s does not exist, trying to add it\n", internal_username)); - auth_add_user_script( nt_domain, sent_nt_username ); + smb_create_user( nt_domain, sent_nt_username, NULL); nt_status = fill_sam_account( mem_ctx, nt_domain, sent_nt_username, &found_username, &uid, &gid, &sam_account ); } |