Module Name:    src
Committed By:   hannken
Date:           Tue Feb 16 09:54:17 UTC 2021

Modified Files:
        src/external/cddl/osnet/dist/uts/common/fs/zfs/sys: zfs_context.h

Log Message:
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)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
    src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_context.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_context.h
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_context.h:1.2 src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_context.h:1.3
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_context.h:1.2	Sat Jun 22 09:48:39 2019
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_context.h	Tue Feb 16 09:54:17 2021
@@ -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
 

Reply via email to