Date: Fri, 22 Jul 2016 17:25:28 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303194 - stable/10/sys/kern Message-ID: <201607221725.u6MHPS2b092858@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Jul 22 17:25:28 2016 New Revision: 303194 URL: https://svnweb.freebsd.org/changeset/base/303194 Log: MFC r302893: Do not allow creation of char or block special nodes with VNOVAL dev_t. Modified: stable/10/sys/kern/vfs_syscalls.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_syscalls.c ============================================================================== --- stable/10/sys/kern/vfs_syscalls.c Fri Jul 22 17:24:36 2016 (r303193) +++ stable/10/sys/kern/vfs_syscalls.c Fri Jul 22 17:25:28 2016 (r303194) @@ -1269,6 +1269,8 @@ kern_mknodat(struct thread *td, int fd, case S_IFCHR: case S_IFBLK: error = priv_check(td, PRIV_VFS_MKNOD_DEV); + if (error == 0 && dev == VNOVAL) + error = EINVAL; break; case S_IFMT: error = priv_check(td, PRIV_VFS_MKNOD_BAD);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607221725.u6MHPS2b092858>