Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ffs ffs: fix the creation of device nodes on file sy...



details:   https://anonhg.NetBSD.org/src/rev/97737f8eca13
branches:  trunk
changeset: 1027645:97737f8eca13
user:      chs <chs%NetBSD.org@localhost>
date:      Tue Dec 14 11:06:50 2021 +0000

description:
ffs: fix the creation of device nodes on file systems with ACLs enabled.

diffstat:

 sys/ufs/ffs/ffs_extattr.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (62 lines):

diff -r 5ba463234f10 -r 97737f8eca13 sys/ufs/ffs/ffs_extattr.c
--- a/sys/ufs/ffs/ffs_extattr.c Tue Dec 14 11:06:12 2021 +0000
+++ b/sys/ufs/ffs/ffs_extattr.c Tue Dec 14 11:06:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_extattr.c,v 1.7 2020/09/05 16:30:13 riastradh Exp $        */
+/*     $NetBSD: ffs_extattr.c,v 1.8 2021/12/14 11:06:50 chs Exp $      */
 
 /*-
  * SPDX-License-Identifier: (BSD-2-Clause-FreeBSD AND BSD-3-Clause)
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_extattr.c,v 1.7 2020/09/05 16:30:13 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_extattr.c,v 1.8 2021/12/14 11:06:50 chs Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -587,8 +587,10 @@
        if (fs->fs_magic == FS_UFS1_MAGIC)
                return (EOPNOTSUPP);
 
+#ifdef __FreeBSD__
        if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
                return (EOPNOTSUPP);
+#endif
 
        return (ffs_open_ea(ap->a_vp, ap->a_cred));
 }
@@ -612,8 +614,10 @@
        if (fs->fs_magic == FS_UFS1_MAGIC)
                return (EOPNOTSUPP);
 
+#ifdef __FreeBSD__
        if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
                return (EOPNOTSUPP);
+#endif
 
        if (ap->a_commit && (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY))
                return (EROFS);
@@ -649,8 +653,10 @@
        unsigned easize;
        int error, ealen;
 
+#ifdef __FreeBSD__
        if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
                return (EOPNOTSUPP);
+#endif
 
        error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace,
            ap->a_cred, VREAD);
@@ -892,8 +898,10 @@
        u_char *eae;
        void *tmp;
 
+#ifdef __FreeBSD__
        if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
                return (EOPNOTSUPP);
+#endif
 
        if (strlen(ap->a_name) == 0)
                return (EINVAL);



Home | Main Index | Thread Index | Old Index