pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/filesystems/glusterfs
Module Name: pkgsrc
Committed By: manu
Date: Mon Jul 27 16:06:08 UTC 2020
Modified Files:
pkgsrc/filesystems/glusterfs: Makefile distinfo
pkgsrc/filesystems/glusterfs/patches: patch-configure
patch-configure.ac patch-rpc_rpc_lib_rpcsvc.c
patch-tools_gfind__missing__files_gfind__missing__files.sh
patch-xlators_performance_write-behind_src_write-behind.c
Added Files:
pkgsrc/filesystems/glusterfs/patches: patch-config.h.in
patch-xlators_mgmt_glusterd_src_glusterd-utils.c
patch-xlators_mount_fuse_src_fuse-bridge.c
patch-xlators_storage_posix_src_posix-entry-ops.c
Log Message:
Bugfixes from upstream
- Properly screen the .attribute directory where NetBSD UFS1 stores
extended attributes.
- Fix NULL pointer usage.
- Make FUSE notification optional at configure time since NetBSD does not
implement them.
And update comment in patches with references to commits upstream
To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 pkgsrc/filesystems/glusterfs/Makefile
cvs rdiff -u -r1.69 -r1.70 pkgsrc/filesystems/glusterfs/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/filesystems/glusterfs/patches/patch-config.h.in \
pkgsrc/filesystems/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-utils.c \
pkgsrc/filesystems/glusterfs/patches/patch-xlators_mount_fuse_src_fuse-bridge.c \
pkgsrc/filesystems/glusterfs/patches/patch-xlators_storage_posix_src_posix-entry-ops.c
cvs rdiff -u -r1.3 -r1.4 pkgsrc/filesystems/glusterfs/patches/patch-configure
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/filesystems/glusterfs/patches/patch-configure.ac \
pkgsrc/filesystems/glusterfs/patches/patch-rpc_rpc_lib_rpcsvc.c \
pkgsrc/filesystems/glusterfs/patches/patch-tools_gfind__missing__files_gfind__missing__files.sh \
pkgsrc/filesystems/glusterfs/patches/patch-xlators_performance_write-behind_src_write-behind.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/filesystems/glusterfs/Makefile
diff -u pkgsrc/filesystems/glusterfs/Makefile:1.99 pkgsrc/filesystems/glusterfs/Makefile:1.100
--- pkgsrc/filesystems/glusterfs/Makefile:1.99 Tue Jul 7 01:01:27 2020
+++ pkgsrc/filesystems/glusterfs/Makefile Mon Jul 27 16:06:08 2020
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.99 2020/07/07 01:01:27 manu Exp $
+# $NetBSD: Makefile,v 1.100 2020/07/27 16:06:08 manu Exp $
DISTNAME= glusterfs-8.0
-#PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= filesystems
MASTER_SITES= http://bits.gluster.org/pub/gluster/glusterfs/src/
@@ -15,6 +15,7 @@ USE_LIBTOOL= yes
USE_TOOLS+= flex bison pkg-config bash
CONFIGURE_ARGS+= --disable-fusermount
+CONFIGURE_ARGS+= --disable-fuse-notifications
CONFIGURE_ARGS+= --localstatedir=${VARBASE}
# Make sure we do not attept to link with -lfl
@@ -118,7 +119,7 @@ post-install:
${DESTDIR}/${PREFIX}/sbin/mount_glusterfs
# Debug
-CFLAGS+= -g
+CFLAGS+= -g
INSTALL_UNSTRIPPED= yes
CONFIGURE_ARGS+= --enable-debug
#.include "../../devel/boehm-gc/buildlink3.mk"
Index: pkgsrc/filesystems/glusterfs/distinfo
diff -u pkgsrc/filesystems/glusterfs/distinfo:1.69 pkgsrc/filesystems/glusterfs/distinfo:1.70
--- pkgsrc/filesystems/glusterfs/distinfo:1.69 Tue Jul 7 01:01:27 2020
+++ pkgsrc/filesystems/glusterfs/distinfo Mon Jul 27 16:06:08 2020
@@ -1,11 +1,15 @@
-$NetBSD: distinfo,v 1.69 2020/07/07 01:01:27 manu Exp $
+$NetBSD: distinfo,v 1.70 2020/07/27 16:06:08 manu Exp $
SHA1 (glusterfs-8.0.tar.gz) = 8b9c5d1abcec207b716bd4d6b05957872c3a0f6d
RMD160 (glusterfs-8.0.tar.gz) = 157db93505b4baad9f985ac45ff5283ae432352b
SHA512 (glusterfs-8.0.tar.gz) = 6af94f31e08e9ba9d1f3f674678553815933f8db58672d4225f855dc47f3290e1ad22f44dbe95856f82120bf195bc2df7dbd02c88e3a27d9363877891c619b58
Size (glusterfs-8.0.tar.gz) = 7800370 bytes
-SHA1 (patch-configure) = 8914f1434475faa7cbd419a3e31c44fdee872ed2
-SHA1 (patch-configure.ac) = 5c90938a02b6be460b733e88cd1932ed61fdb6fa
-SHA1 (patch-rpc_rpc_lib_rpcsvc.c) = d2d039b656327a43463d0819a1bcbfb3d99c5691
-SHA1 (patch-tools_gfind__missing__files_gfind__missing__files.sh) = 000cbc70acbb4645b9e55654698fade5605aa5b8
-SHA1 (patch-xlators_performance_write-behind_src_write-behind.c) = db2a72c3d061f3e6bbba51b48b613295b1ecdb0f
+SHA1 (patch-config.h.in) = 1560806ebd786139b404544461dcda0ec1d60b37
+SHA1 (patch-configure) = 07d7a61d7c24ab8b0e4bb00ab6ae2452e41d903f
+SHA1 (patch-configure.ac) = fcb7da30005e9a08e7a0f4ac2f5e55511580aa18
+SHA1 (patch-rpc_rpc_lib_rpcsvc.c) = 44d88cdb8f930d3e920618c9ea0cdc8e9f4ebf58
+SHA1 (patch-tools_gfind__missing__files_gfind__missing__files.sh) = 67d374d8dc3213bd3d159e7cb8479c14e8ba162d
+SHA1 (patch-xlators_mgmt_glusterd_src_glusterd-utils.c) = 3e8e6fa5e4baff94532f58a6509f7b5817ce02bf
+SHA1 (patch-xlators_mount_fuse_src_fuse-bridge.c) = 4706bc7264b7e4ec7f01cc143f3edce96213401e
+SHA1 (patch-xlators_performance_write-behind_src_write-behind.c) = cf3eea86ab4255a7714b25a35a98495eff0f772e
+SHA1 (patch-xlators_storage_posix_src_posix-entry-ops.c) = 2c1acf30097ca4ce7b6ec6e1212f989c86201553
Index: pkgsrc/filesystems/glusterfs/patches/patch-configure
diff -u pkgsrc/filesystems/glusterfs/patches/patch-configure:1.3 pkgsrc/filesystems/glusterfs/patches/patch-configure:1.4
--- pkgsrc/filesystems/glusterfs/patches/patch-configure:1.3 Tue Jul 7 01:01:27 2020
+++ pkgsrc/filesystems/glusterfs/patches/patch-configure Mon Jul 27 16:06:08 2020
@@ -1,8 +1,59 @@
-$NetBSD: patch-configure,v 1.3 2020/07/07 01:01:27 manu Exp $
+$NetBSD: patch-configure,v 1.4 2020/07/27 16:06:08 manu Exp $
---- configure.orig 2020-06-28 22:54:09.920229276 +0000
-+++ configure 2020-06-28 22:53:47.595791666 +0000
-@@ -14973,8 +14973,11 @@
+Make FUSE notification optional at configure time
+From upstream https://review.gluster.org/24731
+
+NetBSD build fixes
+From upstream https://review.gluster.org/24648
+
+--- configure.orig 2020-07-06 03:22:43.222722780 +0200
++++ configure 2020-07-22 02:28:26.017707376 +0200
+@@ -932,8 +932,9 @@
+ with_tmpfilesdir
+ with_ocf
+ with_server
+ enable_fuse_client
++enable_fuse_notifications
+ enable_fusermount
+ enable_epoll
+ enable_georeplication
+ enable_events
+@@ -1619,8 +1620,10 @@
+ Disable internal tracking of privileged ports.
+ --enable-valgrind Enable valgrind for resource leak debugging.
+ --disable-fuse-client Do not build the fuse client. NOTE: you cannot mount
+ glusterfs without the client
++ --disable-fuse-notifications
++ Disable FUSE notifications
+ --disable-fusermount Use system's fusermount
+ --disable-epoll Use poll instead of epoll.
+ --disable-georeplication
+ Do not install georeplication components
+@@ -14172,8 +14175,23 @@
+ if test "x$enable_fuse_client" != "xno"; then
+ FUSE_CLIENT_SUBDIR=fuse
+ BUILD_FUSE_CLIENT="yes"
+ fi
++
++
++
++# Check whether --enable-fuse-notifications was given.
++if test "${enable_fuse_notifications+set}" = set; then :
++ enableval=$enable_fuse_notifications;
++fi
++
++
++if test "x$enable_fuse_notifications" != "xno"; then :
++
++
++$as_echo "#define HAVE_FUSE_NOTIFICATIONS 1" >>confdefs.h
++
++fi
+
+
+ # end FUSE section
+
+@@ -14973,8 +14991,11 @@
*freebsd*)
CFLAGS="${CFLAGS} -isystem /usr/local/include"
ARGP_LDADD=-largp
Index: pkgsrc/filesystems/glusterfs/patches/patch-configure.ac
diff -u pkgsrc/filesystems/glusterfs/patches/patch-configure.ac:1.1 pkgsrc/filesystems/glusterfs/patches/patch-configure.ac:1.2
--- pkgsrc/filesystems/glusterfs/patches/patch-configure.ac:1.1 Tue Jul 7 01:01:27 2020
+++ pkgsrc/filesystems/glusterfs/patches/patch-configure.ac Mon Jul 27 16:06:08 2020
@@ -1,8 +1,28 @@
-$NetBSD: patch-configure.ac,v 1.1 2020/07/07 01:01:27 manu Exp $
+$NetBSD: patch-configure.ac,v 1.2 2020/07/27 16:06:08 manu Exp $
---- configure.ac.orig 2020-05-31 16:45:57.328537679 +0200
-+++ configure.ac 2020-06-28 03:10:02.906173087 +0200
-@@ -945,8 +945,11 @@
+Make FUSE notification optional at configure time
+From upstream https://review.gluster.org/24731
+
+--- configure.ac.orig 2020-07-06 03:22:37.734704915 +0200
++++ configure.ac 2020-07-22 02:26:32.903778538 +0200
+@@ -683,8 +683,16 @@
+ BUILD_FUSE_CLIENT="yes"
+ fi
+
+ AC_SUBST(FUSE_CLIENT_SUBDIR)
++
++AC_ARG_ENABLE([fuse-notifications],
++ AS_HELP_STRING([--disable-fuse-notifications], [Disable FUSE notifications]))
++
++AS_IF([test "x$enable_fuse_notifications" != "xno"], [
++ AC_DEFINE([HAVE_FUSE_NOTIFICATIONS], [1], [Use FUSE notifications])
++])
++
+ # end FUSE section
+
+
+ AC_CHECK_LIB([ssl], TLS_method, [HAVE_OPENSSL_1_1="yes"], [HAVE_OPENSSL_1_1="no"])
+@@ -945,8 +953,11 @@
*freebsd*)
CFLAGS="${CFLAGS} -isystem /usr/local/include"
ARGP_LDADD=-largp
Index: pkgsrc/filesystems/glusterfs/patches/patch-rpc_rpc_lib_rpcsvc.c
diff -u pkgsrc/filesystems/glusterfs/patches/patch-rpc_rpc_lib_rpcsvc.c:1.1 pkgsrc/filesystems/glusterfs/patches/patch-rpc_rpc_lib_rpcsvc.c:1.2
--- pkgsrc/filesystems/glusterfs/patches/patch-rpc_rpc_lib_rpcsvc.c:1.1 Tue Jul 7 01:01:27 2020
+++ pkgsrc/filesystems/glusterfs/patches/patch-rpc_rpc_lib_rpcsvc.c Mon Jul 27 16:06:08 2020
@@ -1,4 +1,7 @@
-$NetBSD: patch-rpc_rpc_lib_rpcsvc.c,v 1.1 2020/07/07 01:01:27 manu Exp $
+$NetBSD: patch-rpc_rpc_lib_rpcsvc.c,v 1.2 2020/07/27 16:06:08 manu Exp $
+
+NetBSD build fixes
+From upstream https://review.gluster.org/24648
--- ./rpc/rpc-lib/src/rpcsvc.c.orig 2020-06-28 02:37:34.988840145 +0200
+++ ./rpc/rpc-lib/src/rpcsvc.c 2020-06-28 02:38:41.302115459 +0200
Index: pkgsrc/filesystems/glusterfs/patches/patch-tools_gfind__missing__files_gfind__missing__files.sh
diff -u pkgsrc/filesystems/glusterfs/patches/patch-tools_gfind__missing__files_gfind__missing__files.sh:1.1
pkgsrc/filesystems/glusterfs/patches/patch-tools_gfind__missing__files_gfind__missing__files.sh:1.2
--- pkgsrc/filesystems/glusterfs/patches/patch-tools_gfind__missing__files_gfind__missing__files.sh:1.1 Mon Mar 23 23:21:17 2020
+++ pkgsrc/filesystems/glusterfs/patches/patch-tools_gfind__missing__files_gfind__missing__files.sh Mon Jul 27 16:06:08 2020
@@ -1,8 +1,7 @@
-$NetBSD: patch-tools_gfind__missing__files_gfind__missing__files.sh,v 1.1 2020/03/23 23:21:17 gdt Exp $
+$NetBSD: patch-tools_gfind__missing__files_gfind__missing__files.sh,v 1.2 2020/07/27 16:06:08 manu Exp $
-Remediate bashism.
-
-Not yet filed upstream.
+NetBSD build fixes
+From upstream https://review.gluster.org/24648
--- tools/gfind_missing_files/gfind_missing_files.sh.orig 2018-04-12 17:46:46.697237625 +0000
+++ tools/gfind_missing_files/gfind_missing_files.sh
Index: pkgsrc/filesystems/glusterfs/patches/patch-xlators_performance_write-behind_src_write-behind.c
diff -u pkgsrc/filesystems/glusterfs/patches/patch-xlators_performance_write-behind_src_write-behind.c:1.1
pkgsrc/filesystems/glusterfs/patches/patch-xlators_performance_write-behind_src_write-behind.c:1.2
--- pkgsrc/filesystems/glusterfs/patches/patch-xlators_performance_write-behind_src_write-behind.c:1.1 Tue Jul 7 01:01:27 2020
+++ pkgsrc/filesystems/glusterfs/patches/patch-xlators_performance_write-behind_src_write-behind.c Mon Jul 27 16:06:08 2020
@@ -1,33 +1,28 @@
-$NetBSD: patch-xlators_performance_write-behind_src_write-behind.c,v 1.1 2020/07/07 01:01:27 manu Exp $
+$NetBSD: patch-xlators_performance_write-behind_src_write-behind.c,v 1.2 2020/07/27 16:06:08 manu Exp $
---- xlators/performance/write-behind/src/write-behind.c.orig 2020-06-28 02:50:52.965398208 +0200
-+++ xlators/performance/write-behind/src/write-behind.c 2020-06-28 02:58:49.641108451 +0200
-@@ -2488,9 +2488,13 @@
+NetBSD build fixes
+from upstream https://review.gluster.org/24648
+
+--- xlators/performance/write-behind/src/write-behind.c.orig 2020-07-06 03:22:38.006705801 +0200
++++ xlators/performance/write-behind/src/write-behind.c 2020-07-27 17:55:06.263570589 +0200
+@@ -2488,9 +2488,9 @@
wb_inode_t *wb_directory_inode = NULL;
wb_directory_inode = wb_inode_create(this, directory);
- if (!wb_directory_inode || !wb_directory_inode->lock.spinlock)
-+ if (!wb_directory_inode
-+#ifndef __NetBSD__
-+ || !wb_directory_inode->lock.spinlock
-+#endif
-+ )
++ if (!wb_directory_inode)
return;
LOCK(&wb_directory_inode->lock);
{
-@@ -2508,9 +2512,13 @@
+@@ -2508,9 +2508,9 @@
int readdirps = 0;
wb_directory_inode = wb_inode_ctx_get(this, directory);
- if (!wb_directory_inode || !wb_directory_inode->lock.spinlock)
-+ if (!wb_directory_inode
-+#ifndef __NetBSD__
-+ || !wb_directory_inode->lock.spinlock
-+#endif
-+ )
++ if (!wb_directory_inode)
return;
LOCK(&wb_directory_inode->lock);
Added files:
Index: pkgsrc/filesystems/glusterfs/patches/patch-config.h.in
diff -u /dev/null pkgsrc/filesystems/glusterfs/patches/patch-config.h.in:1.1
--- /dev/null Mon Jul 27 16:06:08 2020
+++ pkgsrc/filesystems/glusterfs/patches/patch-config.h.in Mon Jul 27 16:06:08 2020
@@ -0,0 +1,19 @@
+$NetBSD: patch-config.h.in,v 1.1 2020/07/27 16:06:08 manu Exp $
+
+Make FUSE notification optional at configure time
+From upstream https://review.gluster.org/24731
+
+--- config.h.in.orig 2020-07-22 02:24:03.169608070 +0200
++++ config.h.in 2020-07-22 02:24:28.887999809 +0200
+@@ -47,8 +47,11 @@
+
+ /* define if fdatasync exists */
+ #undef HAVE_FDATASYNC
+
++/* Use FUSE notifications */
++#undef HAVE_FUSE_NOTIFICATIONS
++
+ /* Define to 1 if you have the <inttypes.h> header file. */
+ #undef HAVE_INTTYPES_H
+
+ /* have sys/ioctl.h */
Index: pkgsrc/filesystems/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-utils.c
diff -u /dev/null pkgsrc/filesystems/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-utils.c:1.1
--- /dev/null Mon Jul 27 16:06:08 2020
+++ pkgsrc/filesystems/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-utils.c Mon Jul 27 16:06:08 2020
@@ -0,0 +1,19 @@
+$NetBSD: patch-xlators_mgmt_glusterd_src_glusterd-utils.c,v 1.1 2020/07/27 16:06:08 manu Exp $
+
+fix NULL pointer reference
+From upstream https://review.gluster.org/24726
+
+--- ./xlators/mgmt/glusterd/src/glusterd-utils.c.orig 2020-07-10 02:53:59.416898136 +0200
++++ ./xlators/mgmt/glusterd/src/glusterd-utils.c 2020-07-10 02:54:16.956178597 +0200
+@@ -6394,9 +6394,10 @@
+ }
+ }
+ }
+ out:
+- sys_closedir(dirp);
++ if (dirp)
++ sys_closedir(dirp);
+ return brick_path;
+ }
+
+ int
Index: pkgsrc/filesystems/glusterfs/patches/patch-xlators_mount_fuse_src_fuse-bridge.c
diff -u /dev/null pkgsrc/filesystems/glusterfs/patches/patch-xlators_mount_fuse_src_fuse-bridge.c:1.1
--- /dev/null Mon Jul 27 16:06:08 2020
+++ pkgsrc/filesystems/glusterfs/patches/patch-xlators_mount_fuse_src_fuse-bridge.c Mon Jul 27 16:06:08 2020
@@ -0,0 +1,62 @@
+$NetBSD: patch-xlators_mount_fuse_src_fuse-bridge.c,v 1.1 2020/07/27 16:06:08 manu Exp $
+
+Make FUSE notification optional at configure time
+From upstream https://review.gluster.org/24731
+
+--- xlators/mount/fuse/src/fuse-bridge.c.orig
++++ xlators/mount/fuse/src/fuse-bridge.c
+@@ -8,6 +8,8 @@
+ cases as published by the Free Software Foundation.
+ */
+
++#include <config.h>
++
+ #include <sys/wait.h>
+ #include "fuse-bridge.h"
+ #include <glusterfs/glusterfs.h>
+@@ -405,7 +407,7 @@ send_fuse_data(xlator_t *this, fuse_in_header_t *finh, void *data, size_t size)
+ static int32_t
+ fuse_invalidate_entry(xlator_t *this, uint64_t fuse_ino)
+ {
+-#if FUSE_KERNEL_MINOR_VERSION >= 11
++#if (FUSE_KERNEL_MINOR_VERSION >= 11 && defined(HAVE_FUSE_NOTIFICATIONS))
+ struct fuse_out_header *fouh = NULL;
+ struct fuse_notify_inval_entry_out *fnieo = NULL;
+ fuse_private_t *priv = NULL;
+@@ -496,7 +498,7 @@ fuse_invalidate_entry(xlator_t *this, uint64_t fuse_ino)
+ static int32_t
+ fuse_invalidate_inode(xlator_t *this, uint64_t fuse_ino)
+ {
+-#if FUSE_KERNEL_MINOR_VERSION >= 11
++#if (FUSE_KERNEL_MINOR_VERSION >= 11 && defined(HAVE_FUSE_NOTIFICATIONS))
+ struct fuse_out_header *fouh = NULL;
+ struct fuse_notify_inval_inode_out *fniio = NULL;
+ fuse_private_t *priv = NULL;
+@@ -4918,7 +4920,7 @@ fuse_setlk(xlator_t *this, fuse_in_header_t *finh, void *msg,
+ return;
+ }
+
+-#if FUSE_KERNEL_MINOR_VERSION >= 11
++#if FUSE_KERNEL_MINOR_VERSION >= 11 && defined(HAVE_FUSE_NOTIFICATIONS)
+ static void *
+ notify_kernel_loop(void *data)
+ {
+@@ -5165,6 +5167,7 @@ fuse_init(xlator_t *this, fuse_in_header_t *finh, void *msg,
+ priv->timed_response_fuse_thread_started = _gf_true;
+
+ /* Used for 'reverse invalidation of inode' */
++#ifdef HAVE_FUSE_NOTIFICATIONS
+ if (fini->minor >= 12) {
+ ret = gf_thread_create(&messenger, NULL, notify_kernel_loop, this,
+ "fusenoti");
+@@ -5176,7 +5179,9 @@ fuse_init(xlator_t *this, fuse_in_header_t *finh, void *msg,
+ goto out;
+ }
+ priv->reverse_fuse_thread_started = _gf_true;
+- } else {
++ } else
++#endif
++ {
+ /*
+ * FUSE minor < 12 does not implement invalidate notifications.
+ * This mechanism is required for fopen-keep-cache to operate
Index: pkgsrc/filesystems/glusterfs/patches/patch-xlators_storage_posix_src_posix-entry-ops.c
diff -u /dev/null pkgsrc/filesystems/glusterfs/patches/patch-xlators_storage_posix_src_posix-entry-ops.c:1.1
--- /dev/null Mon Jul 27 16:06:08 2020
+++ pkgsrc/filesystems/glusterfs/patches/patch-xlators_storage_posix_src_posix-entry-ops.c Mon Jul 27 16:06:08 2020
@@ -0,0 +1,75 @@
+$NetBSD: patch-xlators_storage_posix_src_posix-entry-ops.c,v 1.1 2020/07/27 16:06:08 manu Exp $
+
+Properly screen the .attribute directory where NetBSD UFS1 stores
+extended attributes.
+From upstream https://review.gluster.org/24702
+
+--- xlators/storage/posix/src/posix-entry-ops.c.orig 2020-07-08 09:00:29.350013944 +0200
++++ xlators/storage/posix/src/posix-entry-ops.c 2020-07-08 09:04:15.087789405 +0200
+@@ -197,8 +197,22 @@
+ op_ret = -1;
+ goto out;
+ }
+
++#ifdef __NetBSD__
++ /* Same for NetBSD's .attribute directory */
++ if (__is_root_gfid(loc->pargfid) && loc->name &&
++ (strcmp(loc->name, ".attribute") == 0)) {
++ gf_msg(this->name, GF_LOG_WARNING, EPERM, P_MSG_LOOKUP_NOT_PERMITTED,
++ "Lookup issued on .attribute,"
++ " which is not permitted");
++ op_errno = EPERM;
++ op_ret = -1;
++ goto out;
++ }
++#endif /* __NetBSD__ */
++
++
+ op_ret = dict_get_int32_sizen(xdata, GF_GFIDLESS_LOOKUP, &gfidless);
+ op_ret = -1;
+ if (gf_uuid_is_null(loc->pargfid) || (loc->name == NULL)) {
+ /* nameless lookup */
+@@ -649,8 +663,21 @@
+ op_ret = -1;
+ goto out;
+ }
+
++#ifdef __NetBSD__
++ /* Same for NetBSD's .attribute directory */
++ if (__is_root_gfid(loc->pargfid) &&
++ (strcmp(loc->name, ".attribute") == 0)) {
++ gf_msg(this->name, GF_LOG_WARNING, EPERM, P_MSG_MKDIR_NOT_PERMITTED,
++ "mkdir issued on .attribute, which"
++ "is not permitted");
++ op_errno = EPERM;
++ op_ret = -1;
++ goto out;
++ }
++#endif
++
+ priv = this->private;
+ VALIDATE_OR_GOTO(priv, out);
+ GFID_NULL_CHECK_AND_GOTO(frame, this, loc, xdata, op_ret, op_errno,
+ uuid_req, out);
+@@ -1415,8 +1442,21 @@
+ op_ret = -1;
+ goto out;
+ }
+
++#ifdef __NetBSD__
++ /* Same for NetBSD's .attribute directory */
++ if (__is_root_gfid(loc->pargfid) &&
++ (strcmp(loc->name, ".attribute") == 0)) {
++ gf_msg(this->name, GF_LOG_WARNING, EPERM, P_MSG_RMDIR_NOT_PERMITTED,
++ "rmdir issued on .attribute, which"
++ "is not permitted");
++ op_errno = EPERM;
++ op_ret = -1;
++ goto out;
++ }
++#endif
++
+ priv = this->private;
+
+ MAKE_ENTRY_HANDLE(real_path, par_path, this, loc, &stbuf);
+ if (!real_path || !par_path) {
Home |
Main Index |
Thread Index |
Old Index