mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Do not panic if request issued by kernel.
Reported by: Vladimir Poliakov <vnp@mail.kccm.ru>
This commit is contained in:
parent
21529323c9
commit
424913b211
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59036
@ -93,7 +93,8 @@ int
|
||||
ncp_conn_access(struct ncp_conn *conn, struct ucred *cred, mode_t mode) {
|
||||
int error;
|
||||
|
||||
if (ncp_suser(cred) == 0 || cred->cr_uid == conn->nc_owner->cr_uid)
|
||||
if (cred == NOCRED || ncp_suser(cred) == 0 ||
|
||||
cred->cr_uid == conn->nc_owner->cr_uid)
|
||||
return 0;
|
||||
mode >>= 3;
|
||||
if (!groupmember(conn->nc_group, cred))
|
||||
|
Loading…
Reference in New Issue
Block a user