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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 21 Dec 2016 13:11:45 -0600
From:   Sam Voss <samuel.voss@...kwellcollins.com>
To:     linux-ext4@...r.kernel.org
Cc:     Clayton Shotwell <clayton.shotwell@...kwellcollins.com>,
        Samuel Voss <samuel.voss@...kwellcollins.com>
Subject: [PATCH] debugfs: ls -p can print invalid characters

From: Clayton Shotwell <clayton.shotwell@...kwellcollins.com>

The recent modification to the "ls -p" function can print out characters
that the other ls functions do not print out. Adding a slight change to
use the same print function for all of the ls options.

Signed-off-by: Clayton Shotwell <clayton.shotwell@...kwellcollins.com>
Signed-off-by: Samuel Voss <samuel.voss@...kwellcollins.com>
---
 debugfs/ls.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/debugfs/ls.c b/debugfs/ls.c
index 057e3f6..cb40627 100644
--- a/debugfs/ls.c
+++ b/debugfs/ls.c
@@ -122,8 +122,10 @@ static int list_dir_proc(ext2_ino_t dir EXT2FS_ATTR((unused)),
 				return 0;
 		} else
 			memset(&inode, 0, sizeof(struct ext2_inode));
-		fprintf(ls->f,"/%u/%06o/%d/%d/%*s/", ino, inode.i_mode,
-			inode.i_uid, inode.i_gid, thislen, dirent->name);
+		fprintf(ls->f,"/%u/%06o/%d/%d/", ino, inode.i_mode,
+			inode.i_uid, inode.i_gid);
+		print_filename(ls->f, dirent, options);
+		fputc('/', ls->f);
 		if (LINUX_S_ISDIR(inode.i_mode))
 			fprintf(ls->f, "/");
 		else
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ