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]
Date:	Mon, 5 Aug 2013 16:40:31 +0800
From:	Robert Yang <liezhi.yang@...driver.com>
To:	<linux-ext4@...r.kernel.org>
CC:	Darren Hart <dvhart@...ux.intel.com>,
	"Theodore Ts'o" <tytso@....edu>
Subject: [RFC] e2fsprogs/mke2fs: add an option  "-d root-directory"


Hello folks,

I'd like to add an "-d root-directory" option for mke2fs, which is used
for adding files from the "root-directory" to the filesystem after the
formatting, it is similar to genext2fs, but which only supports ext2 AFAIK.
it's usage example would be:

$ mke2fs -t extX -d <dir> <device>

I've done a few work on it, we can re-use the code from debugfs/debugfs.c,
here are the draft implementation thoughts:

Move a part of the code from debugfs/debugfs.c to misc/util.c, for example,
we will change the function do_write() in debugfs.c to:

void do_write(int argc, char *argv[])
{
	[snip];
	retval = do_write_internal();
         [snip];
}

The do_write_internal() will be defined in misc/util.c, then both debugfs.c
and mke2fs.c can use it. We will do the similar thing to do_mkdir(),
do_symlink() and so on.

My questions are:
1) Is the "-d root-directory" option acceptable ?
2) Is the implementation idea OK ?

Please feel free to give your comments, and I will send the patches later
if this is fine.

-- 
Thanks

Robert
--
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