Date: Fri, 4 May 2012 15:51:23 +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: r235010 - in stable/9/sys: i386/conf kern ufs/ufs Message-ID: <201205041551.q44FpNDa011083@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jh Date: Fri May 4 15:51:23 2012 New Revision: 235010 URL: http://svn.freebsd.org/changeset/base/235010 Log: MFC r233875: Add a check for unsupported file flags to ufs_setattr(). Modified: stable/9/sys/ufs/ufs/ufs_vnops.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/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/9/sys/ufs/ufs/ufs_vnops.c Fri May 4 15:49:08 2012 (r235009) +++ stable/9/sys/ufs/ufs/ufs_vnops.c Fri May 4 15:51:23 2012 (r235010) @@ -528,6 +528,10 @@ ufs_setattr(ap) return (EINVAL); } if (vap->va_flags != VNOVAL) { + if ((vap->va_flags & ~(UF_NODUMP | UF_IMMUTABLE | UF_APPEND | + UF_OPAQUE | UF_NOUNLINK | SF_ARCHIVED | SF_IMMUTABLE | + SF_APPEND | SF_NOUNLINK | SF_SNAPSHOT)) != 0) + return (EOPNOTSUPP); if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205041551.q44FpNDa011083>