Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 May 2012 15:46:37 +0000 (UTC)
From:      Jaakko Heinonen <jh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r235449 - in stable/9/sys: i386/conf kern
Message-ID:  <201205141546.q4EFkbdo039948@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jh
Date: Mon May 14 15:46:37 2012
New Revision: 235449
URL: http://svn.freebsd.org/changeset/base/235449

Log:
  MFC r234489:
  
  The value of flags matching VNOVAL can't be supported. Return EOPNOTSUPP
  from setfflags() in this case. This fixes the return value of
  chflags(path, -1).

Modified:
  stable/9/sys/kern/vfs_syscalls.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)
  stable/9/sys/kern/subr_witness.c   (props changed)

Modified: stable/9/sys/kern/vfs_syscalls.c
==============================================================================
--- stable/9/sys/kern/vfs_syscalls.c	Mon May 14 15:20:39 2012	(r235448)
+++ stable/9/sys/kern/vfs_syscalls.c	Mon May 14 15:46:37 2012	(r235449)
@@ -2743,6 +2743,10 @@ setfflags(td, vp, flags)
 	struct mount *mp;
 	struct vattr vattr;
 
+	/* We can't support the value matching VNOVAL. */
+	if (flags == VNOVAL)
+		return (EOPNOTSUPP);
+
 	/*
 	 * Prevent non-root users from setting flags on devices.  When
 	 * a device is reused, users can retain ownership of the device



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205141546.q4EFkbdo039948>