diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-05-24 22:05:06 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:13 -0500 |
commit | 1f033febfe19d6bb0b45524a672eaf1d1373f15e (patch) | |
tree | d39f4a956b08c1a9b94ad0dc35f5cb7253866a21 /source4/smb_server/password.c | |
parent | 73f1ec5b0c4042728aed1a9cf22739aa1349090c (diff) | |
download | samba-1f033febfe19d6bb0b45524a672eaf1d1373f15e.tar.gz samba-1f033febfe19d6bb0b45524a672eaf1d1373f15e.tar.bz2 samba-1f033febfe19d6bb0b45524a672eaf1d1373f15e.zip |
r861: remove the next round of unused stuff
metze
(This used to be commit 8f59daba0d03a2c58f7f23655153de05cbe47e81)
Diffstat (limited to 'source4/smb_server/password.c')
-rw-r--r-- | source4/smb_server/password.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/source4/smb_server/password.c b/source4/smb_server/password.c index 8dadd0400e..5f7431f623 100644 --- a/source4/smb_server/password.c +++ b/source4/smb_server/password.c @@ -161,74 +161,3 @@ int register_vuid(struct server_context *smb, return vuser->vuid; } - - -/**************************************************************************** -add a name to the session users list -****************************************************************************/ -void add_session_user(struct server_context *smb, const char *user) -{ - char *suser; - struct passwd *passwd; - - if (!(passwd = Get_Pwnam(user))) return; - - suser = strdup(passwd->pw_name); - if (!suser) { - return; - } - - if (suser && *suser && !in_list(suser,smb->users.session_users,False)) { - char *p; - if (!smb->users.session_users) { - asprintf(&p, "%s", suser); - } else { - asprintf(&p, "%s %s", smb->users.session_users, suser); - } - SAFE_FREE(smb->users.session_users); - smb->users.session_users = p; - } - - free(suser); -} - - -/**************************************************************************** -check if a username is valid -****************************************************************************/ -BOOL user_ok(const char *user,int snum, gid_t *groups, size_t n_groups) -{ - char **valid, **invalid; - BOOL ret; - - valid = invalid = NULL; - ret = True; - - if (lp_invalid_users(snum)) { - str_list_copy(&invalid, lp_invalid_users(snum)); - if (invalid && str_list_substitute(invalid, "%S", lp_servicename(snum))) { - ret = !user_in_list(user, (const char **)invalid, groups, n_groups); - } - } - if (invalid) - str_list_free (&invalid); - - if (ret && lp_valid_users(snum)) { - str_list_copy(&valid, lp_valid_users(snum)); - if (valid && str_list_substitute(valid, "%S", lp_servicename(snum))) { - ret = user_in_list(user, (const char **)valid, groups, n_groups); - } - } - if (valid) - str_list_free (&valid); - - if (ret && lp_onlyuser(snum)) { - char **user_list = str_list_make (lp_username(snum), NULL); - if (user_list && str_list_substitute(user_list, "%S", lp_servicename(snum))) { - ret = user_in_list(user, (const char **)user_list, groups, n_groups); - } - if (user_list) str_list_free (&user_list); - } - - return(ret); -} |