OSDN Git Service

Fix libext2fs and debugfs to correctly deal with symlinks that have
authorTheodore Ts'o <tytso@mit.edu>
Sun, 22 Feb 2004 01:54:31 +0000 (20:54 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 22 Feb 2004 01:54:31 +0000 (20:54 -0500)
extended attribute information.  (Addresses Debian Bug #232328)

debugfs/ChangeLog
debugfs/debugfs.c
lib/ext2fs/ChangeLog
lib/ext2fs/namei.c

index 92b0d99..58235d2 100644 (file)
@@ -1,3 +1,9 @@
+2004-02-14  Theodore Ts'o  <tytso@mit.edu>
+
+       * debugfs.c (internal_dump_inode): Correctly deal with symlinks
+               that have extended attribute information.  (Addresses
+               Debian Bug #232328)
+
 2004-01-24  Theodore Ts'o  <tytso@mit.edu>
 
        * debugfs.8.in: Document the PAGER and DEBUGFS_PAGER environment
index f33e08e..6e3d7dc 100644 (file)
@@ -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)
index 61a62f4..6e3c0d4 100644 (file)
@@ -1,3 +1,9 @@
+2004-02-14  Theodore Ts'o  <tytso@mit.edu>
+
+       * namei.c (follow_link): Correctly deal with symlinks that have
+               extended attribute information.  (Addresses Debian Bug
+               #232328)
+
 2004-01-30  Theodore Ts'o  <tytso@mit.edu>
 
        * ext2_fs.h: Reserve an extra 4 bytes for the journal backup,
index be719a2..13d13ad 100644 (file)
@@ -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;