mirror of
https://github.com/opnsense/src.git
synced 2026-06-03 22:02:58 -04:00
Initialize ni_cnd.cn_cred before calling lookup() (this is normally done
by namei(), which cannot easily be used here however). This fixes boot time crashes on sparc64 and probably other platforms. Reviewed by: phk
This commit is contained in:
parent
fbb4e16a3b
commit
3971dcfa4b
1 changed files with 1 additions and 0 deletions
|
|
@ -1488,6 +1488,7 @@ getdiskbyname(char *name)
|
|||
UIO_SYSSPACE, cp, curthread);
|
||||
nid.ni_startdir = vroot;
|
||||
nid.ni_pathlen = strlen(cp);
|
||||
nid.ni_cnd.cn_cred = curthread->td_ucred;
|
||||
nid.ni_cnd.cn_nameptr = cp;
|
||||
|
||||
error = lookup(&nid);
|
||||
|
|
|
|||
Loading…
Reference in a new issue