Do not panic if request issued by kernel.

Reported by:	Vladimir Poliakov <vnp@mail.kccm.ru>
This commit is contained in:
Boris Popov 2000-04-05 10:54:02 +00:00
parent 21529323c9
commit 424913b211
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59036

View File

@ -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))