Use the right uid / gid for nobody:nobody like FreeBSD does.

Prevents null pointer dereferences when ZFS replaces this
illegal (according to IS_EPHEMERAL()) id with another
illegal id in operation zfs_fuid_create_cred() and
finally zfs_log_create() dereferences fuidp being NULL.

Adresses PR misc/55042 (Panic when creating a directory on a NFS served ZFS)
This commit is contained in:
hannken 2021-02-16 09:54:17 +00:00
parent 6974a2b259
commit 368d0d651b
1 changed files with 2 additions and 2 deletions

View File

@ -157,13 +157,13 @@ extern "C" {
#define fm_panic panic
#define getf fd_getfile
#define getminor(a) minor(a)
#define GID_NOBODY (-2)
#define GID_NOBODY (39)
#define issig(x) (sigispending(curlwp, 0))
#define kmem_debugging() 0
#define releasef fd_putfile
#define strfree(str) kmem_free((str), strlen(str)+1)
#define td_ru l_ru
#define UID_NOBODY (-2)
#define UID_NOBODY (32767)
#define vnode_pager_setsize(vp, size) zfs_netbsd_setsize(vp, size)
#define zone_get_hostid(a) 0