From: Volker Lendecke Date: Wed, 30 Apr 2008 15:06:45 +0000 (+0200) Subject: Remove unused set_current_user_guest() X-Git-Tag: samba-4.0.0alpha6~801^2~1521 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd11f1d8a89a5d5f20395ca6aea0bf32b7f273c4;p=thirdparty%2Fsamba.git Remove unused set_current_user_guest() (This used to be commit a33e8d2ffa4daea1deba13b3571cb0b36d521476) --- diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 7013285809c..34d0048b4b6 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -1246,39 +1246,6 @@ bool copy_current_user(struct current_user *dst, struct current_user *src) return True; } -bool set_current_user_guest(struct current_user *dst) -{ - gid_t *groups; - NT_USER_TOKEN *nt_token; - - groups = (gid_t *)memdup(guest_info->groups, - sizeof(gid_t) * guest_info->n_groups); - if (groups == NULL) { - return False; - } - - nt_token = dup_nt_token(NULL, guest_info->ptok); - if (nt_token == NULL) { - SAFE_FREE(groups); - return False; - } - - TALLOC_FREE(dst->nt_user_token); - SAFE_FREE(dst->ut.groups); - - /* dst->conn is never really dereferenced, it's only tested for - * equality in uid.c */ - dst->conn = NULL; - - dst->vuid = UID_FIELD_INVALID; - dst->ut.uid = guest_info->uid; - dst->ut.gid = guest_info->gid; - dst->ut.ngroups = guest_info->n_groups; - dst->ut.groups = groups; - dst->nt_user_token = nt_token; - return True; -} - /*************************************************************************** Purely internal function for make_server_info_info3 Fill the sam account from getpwnam