mirror of
https://github.com/opnsense/src.git
synced 2026-04-21 14:17:06 -04:00
Add a temporary workaround for panics being seen on NFS servers with ZFS,
where an improperly initialized prison field could lead to a panic. This is not the correct solution, since it fails to address similar problems for both AUDIT and MAC, which also rely on properly initialized credentials, but should reduce panic reports while we work that out. Reported by: ps, kan, others
This commit is contained in:
parent
bca2ec16a6
commit
dab07fbcef
1 changed files with 3 additions and 0 deletions
|
|
@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/jail.h>
|
||||
#include <sys/ucred.h>
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
|
@ -181,6 +182,8 @@ svc_getcred(struct svc_req *rqst, struct ucred **crp, int *flavorp)
|
|||
for (i = 0; i < xcr->cr_ngroups; i++)
|
||||
cr->cr_groups[i] = xcr->cr_groups[i];
|
||||
cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0];
|
||||
cr->cr_prison = &prison0;
|
||||
prison_hold(cr->cr_prison);
|
||||
*crp = cr;
|
||||
return (TRUE);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue