mirror of
https://github.com/samba-team/samba.git
synced 2025-11-07 12:23:51 +03:00
r619: Remove more code that is no longer called.
Andrew Bartlett
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
3d4148c07c
commit
4e614cbe92
@@ -531,50 +531,6 @@ static NTSTATUS create_nt_user_token(const DOM_SID *user_sid, const DOM_SID *gro
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Create the SID list for this user.
|
||||
****************************************************************************/
|
||||
|
||||
struct nt_user_token *create_nt_token(uid_t uid, gid_t gid, int ngroups, gid_t *groups, BOOL is_guest)
|
||||
{
|
||||
DOM_SID user_sid;
|
||||
DOM_SID group_sid;
|
||||
DOM_SID *group_sids;
|
||||
NT_USER_TOKEN *token;
|
||||
int i;
|
||||
|
||||
if (!uid_to_sid(&user_sid, uid)) {
|
||||
return NULL;
|
||||
}
|
||||
if (!gid_to_sid(&group_sid, gid)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
group_sids = malloc(sizeof(DOM_SID) * ngroups);
|
||||
if (!group_sids) {
|
||||
DEBUG(0, ("create_nt_token: malloc() failed for DOM_SID list!\n"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < ngroups; i++) {
|
||||
if (!gid_to_sid(&(group_sids)[i], (groups)[i])) {
|
||||
DEBUG(1, ("create_nt_token: failed to convert gid %ld to a sid!\n", (long int)groups[i]));
|
||||
SAFE_FREE(group_sids);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(create_nt_user_token(&user_sid, &group_sid,
|
||||
ngroups, group_sids, is_guest, &token))) {
|
||||
SAFE_FREE(group_sids);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SAFE_FREE(group_sids);
|
||||
|
||||
return token;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
Make a user_info struct
|
||||
***************************************************************************/
|
||||
|
||||
@@ -59,19 +59,6 @@ BOOL share_access_check(struct request_context *req, struct tcon_context *conn,
|
||||
BOOL init_names(void)
|
||||
{ return True; }
|
||||
|
||||
BOOL uid_to_sid(DOM_SID *sid, uid_t uid)
|
||||
{
|
||||
ZERO_STRUCTP(sid);
|
||||
return True;
|
||||
}
|
||||
|
||||
BOOL gid_to_sid(DOM_SID *sid, gid_t gid)
|
||||
{
|
||||
ZERO_STRUCTP(sid);
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
BOOL become_user_permanently(uid_t uid, gid_t gid)
|
||||
{ return True; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user