lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220818163132.1618794-1-j@bitron.ch>
Date:   Thu, 18 Aug 2022 18:31:32 +0200
From:   Jürg Billeter <j@...ron.ch>
To:     linux-ext4@...r.kernel.org
Cc:     Theodore Ts'o <tytso@....edu>,
        Jürg Billeter <j@...ron.ch>
Subject: [PATCH] create_inode: do not fail if filesystem doesn't support xattr

As `set_inode_xattr()` doesn't fail if the `llistxattr()` function is
not available, it seems inconsistent to let `set_inode_xattr()` fail if
`llistxattr()` fails with `ENOTSUP`, indicating that the filesystem
doesn't support extended attributes.

Signed-off-by: Jürg Billeter <j@...ron.ch>
---
 misc/create_inode.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/misc/create_inode.c b/misc/create_inode.c
index c00d5458..d7ab1c20 100644
--- a/misc/create_inode.c
+++ b/misc/create_inode.c
@@ -150,6 +150,8 @@ static errcode_t set_inode_xattr(ext2_filsys fs, ext2_ino_t ino,
 
 	size = llistxattr(filename, NULL, 0);
 	if (size == -1) {
+		if (errno == ENOTSUP)
+			return 0;
 		retval = errno;
 		com_err(__func__, retval, _("while listing attributes of \"%s\""),
 			filename);
-- 
2.35.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ