mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
Remove unused set_current_user_guest()
(This used to be commit a33e8d2ffa4daea1deba13b3571cb0b36d521476)
This commit is contained in:
parent
0636236eec
commit
dd11f1d8a8
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user