From nobody Wed Sep 06 06:34:03 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RgXdl2yXWz4rys0; Wed, 6 Sep 2023 06:34:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RgXdl2TZBz4TNM; Wed, 6 Sep 2023 06:34:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693982043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SDz2wcUSiiuVuuZso6DUOfvsYkzAD5c32nbwQ1Lw3AQ=; b=uPAqA5R+JO/pQ4H3yLi4YbTgG0A6WjzfF39dlGHvDjiFGF8yYhs1vnpNr9V+dLy9Fh2xQl EIB3A5Pc0sqS6NhQ/xMxaofeSviAc3MzWRdDPsTkXmP/+PY1Mg+hBZeAIVnsIB5wS8ZrBO 7iJHjmCVl5W2CuASoqrRGLJ0d9j1Tbe2EvpuIoxtJ7h6YLh4jsJGI7aMgINW5+OQTDXWYZ cVXtuQWLSK3P95QcrIHXvGX5ahUnADqKA9oK1KplF594SEZ2WKzMh4k365G5BUzEzunqox IiMo22aui5G/rRlHO4qk5zePdVi+Ww4JOmXIpDgT7c4KC1DMf2xP1aKcyTGNBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693982043; a=rsa-sha256; cv=none; b=Igj3e+vTbj/7byTX+vOYj/4WqJ+LmvBIrNLP/pPE48uAwVrpQ6udStcGFtgHpvP4kDSVtA I3ROPhjRVDwzrhmt2o8VaTNNnIC9upyHCi/qfLwRkVbzDMC3Z9aGMv0KM+ctstLG2JzHFY N7shkzHvLzlWwU4AXQK/SOsRg1UHO/JyP9cpuGVhJG8k61CunY80rcGaMUAxDWNjnXVRM6 5r6A+vJCJzgWJBpHbwchOEAUvPgIuPWUwPgPKucL1y1ht0i8Uid17cek6oDD/DILs4+Rer lwNh15nnm6hJdmvLS1l4yiRBLSpnXMKZxXdX9MQxL9mufZsn/wx1npgiA0G29g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693982043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SDz2wcUSiiuVuuZso6DUOfvsYkzAD5c32nbwQ1Lw3AQ=; b=vfCc7LJNBijrbtnw8l61BdBMy4w72ks2hOxwap7XNu/RgcRAWWeRMAA16lFVN3oNB4YrUd O8K5EkH3BUNNW8U2eJQ66epPJWasjxcWwS/FoBtLX71gOW0ITfT9ciu+qYDUQ+qx5jkFji rJRuXBvZV39n/fMoNvI3Nih82sJ9bZrcdkVyhA0XObQd0ik+F32Ekrg5SmqI+CjUle9rkk 3qBOcrh71tVWeLw+uzyq7GOuODv7mvyOwGuEK7NtkfWWTPVklVeLhRQs8vcyOQBe3wUZ0+ w73H/ynsgHgViqd+/boGfqZXNvLemM0bMOOuXHVwT6lwLe7sXaodDddKQC2Niw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RgXdl1DZ8z15CX; Wed, 6 Sep 2023 06:34:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3866Y3Xo089106; Wed, 6 Sep 2023 06:34:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3866Y3EV089103; Wed, 6 Sep 2023 06:34:03 GMT (envelope-from git) Date: Wed, 6 Sep 2023 06:34:03 GMT Message-Id: <202309060634.3866Y3EV089103@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Emanuel Haupt Subject: git: 90d93d75b9d1 - main - sysutils/fusefs-ext2: Allow default_permissions override List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ehaupt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90d93d75b9d18e66b76d0b30b9675e7928b93bc5 Auto-Submitted: auto-generated The branch main has been updated by ehaupt: URL: https://cgit.FreeBSD.org/ports/commit/?id=90d93d75b9d18e66b76d0b30b9675e7928b93bc5 commit 90d93d75b9d18e66b76d0b30b9675e7928b93bc5 Author: Alan Somers AuthorDate: 2023-09-06 06:30:49 +0000 Commit: Emanuel Haupt CommitDate: 2023-09-06 06:31:11 +0000 sysutils/fusefs-ext2: Allow default_permissions override The fuse-ext2 program always enables the default_permissions and allow_other options. This is wrong. The user should be able to override those. Since upstream appears to be unmaintained (no commits for 3 years), patch this bug locally. PR: 273586 --- .../fusefs-ext2/files/patch-fuse-ext2_fuse-ext2.c | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/sysutils/fusefs-ext2/files/patch-fuse-ext2_fuse-ext2.c b/sysutils/fusefs-ext2/files/patch-fuse-ext2_fuse-ext2.c new file mode 100644 index 000000000000..6b12035108f4 --- /dev/null +++ b/sysutils/fusefs-ext2/files/patch-fuse-ext2_fuse-ext2.c @@ -0,0 +1,61 @@ +--- fuse-ext2/fuse-ext2.c.orig 2019-05-09 08:29:33 UTC ++++ fuse-ext2/fuse-ext2.c +@@ -18,15 +18,14 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + ++#include + #include "fuse-ext2.h" + + static const char *HOME = "http://github.com/alperakcan/fuse-ext2/"; + + #if __FreeBSD__ == 10 +-static char def_opts[] = "allow_other,default_permissions,local,"; + static char def_opts_rd[] = "noappledouble,"; + #else +-static char def_opts[] = "allow_other,default_permissions,"; + static char def_opts_rd[] = ""; + #endif + +@@ -171,8 +170,10 @@ static int parse_options (int argc, char *argv[], stru + static char * parse_mount_options (const char *orig_opts, struct extfs_data *opts) + { + char *options, *s, *opt, *val, *ret; ++ bool allow_other = true; ++ bool default_permissions = true; + +- ret = malloc(strlen(def_opts) + strlen(def_opts_rd) + strlen(orig_opts) + 256 + PATH_MAX); ++ ret = malloc(strlen(def_opts_rd) + strlen(orig_opts) + 256 + PATH_MAX); + if (!ret) { + return NULL; + } +@@ -231,6 +232,14 @@ static char * parse_mount_options (const char *orig_op + #if __FreeBSD__ == 10 + strcat(ret, "force,"); + #endif ++ } else if (!strcmp(opt, "noallow_other")) { ++ allow_other = false; ++ strcat(ret, opt); ++ strcat(ret, ","); ++ } else if (!strcmp(opt, "nodefault_permissions")) { ++ default_permissions = false; ++ strcat(ret, opt); ++ strcat(ret, ","); + } else { /* Probably FUSE option. */ + strcat(ret, opt); + if (val) { +@@ -246,7 +255,13 @@ static char * parse_mount_options (const char *orig_op + opts->readonly = 1; + } + +- strcat(ret, def_opts); ++ if (allow_other) ++ strcat(ret, "allow_other,"); ++ if (default_permissions) ++ strcat(ret, "default_permissions,"); ++#if __FreeBSD__ == 10 ++ strcat(ret, "local,"); ++#endif + if (opts->readonly == 1) { + strcat(ret, def_opts_rd); + strcat(ret, "ro,");