1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r21953: One format fix, clarify a condition that the IBM

checker was worried about.
Jeremy.
(This used to be commit 70eec7b8ae)
This commit is contained in:
Jeremy Allison 2007-03-23 21:50:44 +00:00 committed by Gerald (Jerry) Carter
parent eb46589432
commit b93126ea12
2 changed files with 21 additions and 3 deletions

View File

@ -181,7 +181,7 @@ char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p)
id = idbuf;
} else {
id = gr->gr_name;
}
}
case SMB_ACL_GROUP_OBJ:
tag = "group";
break;

View File

@ -915,10 +915,28 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
*/
{
BOOL can_write = False;
NT_USER_TOKEN *token = conn->nt_user_token ?
conn->nt_user_token : vuser->nt_user_token;
conn->nt_user_token :
(vuser ? vuser->nt_user_token : NULL);
BOOL can_write = share_access_check(token,
/*
* I don't believe this can happen. But the
* logic above is convoluted enough to confuse
* automated checkers, so be sure. JRA.
*/
if (token == NULL) {
DEBUG(0,("make_connection: connection to %s "
"denied due to missing "
"NT token.\n",
lp_servicename(snum)));
conn_free(conn);
*status = NT_STATUS_ACCESS_DENIED;
return NULL;
}
can_write = share_access_check(token,
lp_servicename(snum),
FILE_WRITE_DATA);