From: Theodore Ts'o Date: Sun, 22 Feb 2004 01:54:31 +0000 (-0500) Subject: Fix libext2fs and debugfs to correctly deal with symlinks that have X-Git-Tag: E2FSPROGS-1_35~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=795afc4483c341d61805247a69b3b696e5599c09;p=thirdparty%2Fe2fsprogs.git Fix libext2fs and debugfs to correctly deal with symlinks that have extended attribute information. (Addresses Debian Bug #232328) --- diff --git a/debugfs/ChangeLog b/debugfs/ChangeLog index 92b0d99fb..58235d2f9 100644 --- a/debugfs/ChangeLog +++ b/debugfs/ChangeLog @@ -1,3 +1,9 @@ +2004-02-14 Theodore Ts'o + + * debugfs.c (internal_dump_inode): Correctly deal with symlinks + that have extended attribute information. (Addresses + Debian Bug #232328) + 2004-01-24 Theodore Ts'o * debugfs.8.in: Document the PAGER and DEBUGFS_PAGER environment diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index f33e08eab..6e3d7dc5e 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -456,7 +456,7 @@ void internal_dump_inode(FILE *out, const char *prefix, if (inode->i_dtime) fprintf(out, "%sdtime: 0x%08x -- %s", prefix, inode->i_dtime, time_to_string(inode->i_dtime)); - if (LINUX_S_ISLNK(inode->i_mode) && inode->i_blocks == 0) + if (LINUX_S_ISLNK(inode->i_mode) && ext2fs_inode_data_blocks(current_fs,inode) == 0) fprintf(out, "%sFast_link_dest: %.*s\n", prefix, (int) inode->i_size, (char *)inode->i_block); else if (do_dump_blocks) diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index 61a62f4f7..6e3c0d4bd 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,3 +1,9 @@ +2004-02-14 Theodore Ts'o + + * namei.c (follow_link): Correctly deal with symlinks that have + extended attribute information. (Addresses Debian Bug + #232328) + 2004-01-30 Theodore Ts'o * ext2_fs.h: Reserve an extra 4 bytes for the journal backup, diff --git a/lib/ext2fs/namei.c b/lib/ext2fs/namei.c index be719a26b..13d13adfe 100644 --- a/lib/ext2fs/namei.c +++ b/lib/ext2fs/namei.c @@ -47,7 +47,7 @@ static errcode_t follow_link(ext2_filsys fs, ext2_ino_t root, ext2_ino_t dir, if (link_count++ > 5) { return EXT2_ET_SYMLINK_LOOP; } - if (ei.i_blocks) { + if (ext2fs_inode_data_blocks(fs,&ei)) { retval = ext2fs_get_mem(fs->blocksize, &buffer); if (retval) return retval;