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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed,  6 Nov 2019 11:14:41 +0100
From:   Lukas Czerner <lczerner@...hat.com>
To:     linux-ext4@...r.kernel.org
Cc:     Theodore Ts'o <tytso@....edu>, David Howells <dhowells@...hat.com>,
        Al Viro <viro@...iv.linux.org.uk>
Subject: [PATCH 01/17] vfs: Handle fs_param_neg_with_empty

From: David Howells <dhowells@...hat.com>

Make fs_param_neg_with_empty work.  It says that a parameter with no value
or and empty value should be marked as negated.

This is intended for use with ext4, which hadn't yet been converted.

Fixes: 31d921c7fb96 ("vfs: Add configuration parser helpers")
Reported-by: Lukas Czerner <lczerner@...hat.com>
Signed-off-by: David Howells <dhowells@...hat.com>
---
 fs/fs_parser.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/fs_parser.c b/fs/fs_parser.c
index d1930adce68d..f95997a76738 100644
--- a/fs/fs_parser.c
+++ b/fs/fs_parser.c
@@ -129,6 +129,11 @@ int fs_parse(struct fs_context *fc,
 	case fs_param_is_string:
 		if (param->type != fs_value_is_string)
 			goto bad_value;
+		if ((p->flags & fs_param_neg_with_empty) &&
+		    (!result->has_value || !param->string[0])) {
+			result->negated = true;
+			goto okay;
+		}
 		if (!result->has_value) {
 			if (p->flags & fs_param_v_optional)
 				goto okay;
-- 
2.21.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ