From 64aecc4dd35b48f66f452f06c49587c838990d39 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 11 Oct 2002 17:44:12 -0400 Subject: [PATCH] Fix bug in e2fsck and mklost+found; the lost+found directory should created with mode 0700. --- e2fsck/ChangeLog | 5 +++++ e2fsck/pass3.c | 2 +- misc/ChangeLog | 5 +++++ misc/mklost+found.c | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 3f19a40a..4a5a9038 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,8 @@ +2002-10-08 Theodore Ts'o + + * pass3.c (e2fsck_get_lost_and_found): Create the lost+found + directory with mode 0700. + 2002-10-02 Theodore Y. Ts'o * pass2.c (parse_int_node, check_dir_block): Add byte-swap diff --git a/e2fsck/pass3.c b/e2fsck/pass3.c index d4fea082..1e68b1e4 100644 --- a/e2fsck/pass3.c +++ b/e2fsck/pass3.c @@ -468,7 +468,7 @@ ext2_ino_t e2fsck_get_lost_and_found(e2fsck_t ctx, int fix) * Set up the inode structure */ memset(&inode, 0, sizeof(inode)); - inode.i_mode = 040755; + inode.i_mode = 040700; inode.i_size = fs->blocksize; inode.i_atime = inode.i_ctime = inode.i_mtime = time(0); inode.i_links_count = 2; diff --git a/misc/ChangeLog b/misc/ChangeLog index 9e623d79..d940c514 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,8 @@ +2002-10-11 Theodore Ts'o + + * mklost+found.c (main): Make sure the lost+found directory is + created with 0700 permissions. + 2002-10-02 Theodore Ts'o * e2image.c (write_raw_image_file): Handle a bad block in the diff --git a/misc/mklost+found.c b/misc/mklost+found.c index d60e7814..fa779300 100644 --- a/misc/mklost+found.c +++ b/misc/mklost+found.c @@ -48,7 +48,7 @@ int main (int argc, char ** argv) fprintf (stderr, _("Usage: mklost+found\n")); exit(1); } - if (mkdir (LPF, 0755) == -1) { + if (mkdir (LPF, 0700) == -1) { perror ("mkdir"); exit(1); } -- 2.11.0