mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue