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: <20231227080805.6801-1-jwilk@jwilk.net>
Date: Wed, 27 Dec 2023 09:08:05 +0100
From: Jakub Wilk <jwilk@...lk.net>
To: Theodore Ts'o <tytso@....edu>
CC: <linux-ext4@...r.kernel.org>
Subject: [PATCH e2fsprogs] e4crypt: fix spurious "Success" error message

Before:

    # e4crypt set_policy 0000000000000000 /dev/null
    /dev/null is not a directory
    /dev/null: Success

After:

    # e4crypt set_policy 0000000000000000 /dev/null
    /dev/null: Not a directory

Signed-off-by: Jakub Wilk <jwilk@...lk.net>
---
 misc/e4crypt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc/e4crypt.c b/misc/e4crypt.c
index 67d25d88..af907041 100644
--- a/misc/e4crypt.c
+++ b/misc/e4crypt.c
@@ -144,7 +144,7 @@ static void validate_paths(int argc, char *argv[], int path_start_index)
 		if (ret < 0)
 			goto invalid;
 		if (!S_ISDIR(st.st_mode)) {
-			fprintf(stderr, "%s is not a directory\n", argv[x]);
+			errno = ENOTDIR;
 			goto invalid;
 		}
 	}
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ