Commit Graph

2504 Commits (205372e24f90d93e55a25c6176bc55a94d304450)

Author SHA1 Message Date
Theodore Ts'o b689b8dd14 Merge branch 'maint' into next
Conflicts:

	lib/ext2fs/closefs.c
2007-12-17 10:28:01 -05:00
Theodore Ts'o 740837def7 Add uuidd daemon to prevent duplicate time-based UUID's
Also store the clock sequence information in a state file in
/var/lib/misc/uuid-clock so that if the time goes backwards the clock
sequence counter can get bumped.  This allows us to completely
correctly generate time-based (version 1) UUID's according to the
algorithm specified RFC 4122.

Addresses-Sourceforge-Bug: #1529672
Addresses-Red-Hat-Bugzilla: #233471

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-16 17:28:46 -05:00
Theodore Ts'o 5221837e62 fsck: '#' is only a comment character at the beginning of an fstab line
Fuse and ssh fstab lines such as:

  wdfs#https://dav.hoster.com/foo/bar /mnt/hoster fuse user,noauto 0 0

will cause fsck to issue warnings about invalid fstab lines, because
fsck was previously treating '#' as a comment when it appeared
anywhere in an fstab line, not just at the beginning of the line.

Addresses-Gentoo-bug: #195405
Addresses-Sourceforge-bug: #1826147

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-16 15:41:15 -05:00
Theodore Ts'o f8efcda2db blkid: Output non-printing characters using ^ and M- notation
When printing the value of tags in a formatted format, print control
characters and characters with the high eight bit set using the ^ and
M- notation, respectively.  This prevents a filesystem with a garbage
label from potentially screwing up the user's screen (for example,
putting it into graphical mode).

Addresses-Ubuntu-Bug: #78087

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-16 12:26:57 -05:00
Theodore Ts'o 43f0cbc1f9 Remove Rwandan translation
Upon the advice of Benno Schulenberg; the translation had already been
removed on the Translation Project site.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-15 23:13:05 -05:00
Theodore Ts'o cb3f5f2f95 Update Dutch and Polish translations from the Translation Project
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-15 23:11:31 -05:00
Theodore Ts'o 6b6c27fb8a libcom_err: Fix sign-extension problem on 64-bit systems in error_message()
On 64-bit systems (or anything with sizeof(long) > sizeof(int)), we
sometimes get error codes passed to error_message which have been cast
from an (int) to an (unsigned int). This almost always happens if
you're using libgssapi_krb5, which returns an error code which is less
than 0 but is returned in an (unsigned int).

For example, -1765328377L gets cast to 2529638919, which is
0x96c73a07, not 0xffffffff96c73a07, so error_message() fails to find a
matching error table.

When error_message() then calls the error_table_name() function to get a
name to use in the "unknown code" message, it gets a correct value back.

This happens because error_table_name() drops most of the higher bits of
the parameter it's passed before doing anything else with it (& 077777777f,
or & 0xffffff). If we did the same thing in error_message(), we wouldn't
have a problem there, either.

Problem reported and fixed by: Nalin Dahyabhai

Addresses-Sourceforge-Bug: #1809658

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-15 22:31:03 -05:00
Theodore Ts'o 20c10a7667 blkid: Avoid division by zero error when probing an invalid FAT filesystem
Addresses-Sourceforge-Bug: #1831627

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-15 22:21:31 -05:00
Theodore Ts'o bef406047d libss: Fix "make check" test case to work portably
The "make check" test in lib/ss would fail if '.' is not in the user's
PATH, and if the libss shared library had not yet been installed yet.

Addresses-Sourceforge-Bug: #1848974

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-15 22:09:48 -05:00
Theodore Ts'o daecda1cad Fix uuid_unparse man page to give a correct example UUID output string
Addresses-Debian-Bug: #444883

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-15 21:13:42 -05:00
Samuel Thibault 3e41608aac Fix Debian rules files to support building non-Linux archs
Addresses-Debian-Bug: #437720

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-15 20:59:29 -05:00
Theodore Ts'o a6ea47ab4b Fix cross-compilation support in Debian's build rules
Addresses-Debian-Bug: #451172

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-15 20:34:41 -05:00
Theodore Ts'o 9a083af71a ext2fs_flushfs: Remove the NEEDS_RECOVERY from the backup superblocks
Now that e2fsck tries to backup the primary superblock to the backups
when the feature sets ar different, it's important when tune2fs writes
out a changed superblock, that we filter out the
EXT3_FEATURE_INCOMPAT_RECOVER feature to the backup superblocks, since
it will be removed from the primary superblock either when the
filesystem is mounted uncleanly or when journal is replayed.

Addresses-Debian-Bug: #454926

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-15 19:39:37 -05:00
Theodore Ts'o e6a4571eec Merge branch 'maint' into next
Conflicts:

	lib/ext2fs/closefs.c
2007-12-09 17:03:01 -05:00
Theodore Ts'o 80dda9bb75 Update release notes, version files, etc., for 1.40.3 release.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-06 00:22:31 -05:00
Theodore Ts'o ee01079a17 libext2fs: Add checks to prevent integer overflows passed to malloc()
This addresses a potential security vulnerability where an untrusted
filesystem can be corrupted in such a way that a program using
libext2fs will allocate a buffer which is far too small.  This can
lead to either a crash or potentially a heap-based buffer overflow
crash.  No known exploits exist, but main concern is where an
untrusted user who possesses privileged access in a guest Xen
environment could corrupt a filesystem which is then accessed by the
pygrub program, running as root in the dom0 host environment, thus
allowing the untrusted user to gain privileged access in the host OS.

Thanks to the McAfee AVERT Research group for reporting this issue.

Addresses CVE-2007-5497.

Signed-off-by: Rafal Wojtczuk <rafal_wojtczuk@mcafee.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-05 21:01:35 -05:00
Theodore Ts'o 7ce238977a Add Ubuntu-specific e2fsck.conf file to work around Ubuntu issues
Ubuntu has init script and installer issues which cause them to have
significant problems with time zones.  This is compounded with a
relatively inexperienced user base who want to dual boot with Windows
and so have their hardware clocks tick localtime.

Addresses-Ubuntu-Bug: #131201

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-05 21:01:22 -05:00
Theodore Ts'o 04aa4727e6 Update Debian policy compliance to version 3.7.3.0
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-05 20:46:12 -05:00
Theodore Ts'o e42dead874 gen-tarball: Ignore the Meta directory when creating the release tarballs
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-05 20:14:43 -05:00
Theodore Ts'o 7527ef1ea8 Update Spanish translation and e2fsprogs.pot file for 1.40.3 release
Addresses-Debian-Bug: #411562

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-05 19:35:20 -05:00
Theodore Ts'o 1113bf706f libss: Fix parallel build failure
A missing dependency on ss_err.h meant that std_rqs.o could fail when
e2fsprogs was being built using make -j.

Thanks to Robert Kerr for reporting this bug.

Addresses-Sourceforge-Bug: #1842331

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-02 05:52:40 -05:00
Eric Sandeen 38361bbbb5 e2fsprogs: fix blkid whole-disk scanning heuristics
The heuristics in blkid/devname.c probe_all() for scanning whole disks
with no partitions assume that a device name with no digit on the end
will always be present as a delineator, i.e.:

sda
sda1
sdb
sdc

In this case, when sdc is seen, it's the clue to go back and scan sdb.
However, for something like:

sda
sda1
sdb
loop0

this falls down, and sdb is never scanned.
(thanks to Karel Zak for pointing this out).

Addresses-Red-Hat-Bugzilla: #400321

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-02 05:25:30 -05:00
Theodore Ts'o 7e5a86a660 libext2fs: Fix a corner case bug in ext2fs_unlink
We cannot merge a removed directory entry to just arbitrary previous
directory entry. The previous entry must be in the same block.  So
really bad things can happen when are deleting the first directory
entry in a block where the last directory entry in the previous
directory block is not in use.  We fix this bug by checking to see if
the current entry is not the first one in the block before trying to
merge it to the previous entry.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-02 05:25:30 -05:00
Andreas Dilger 8cdd6a6f34 fix check_mntent_file() to pass mode for open(O_CREAT)
On my FC8 install, ismounted.c fails to build because open(O_CREAT) is
used without passing a mode.  The following trivial patch fixes it.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2007-12-02 05:25:30 -05:00
Theodore Ts'o 33b92836cd Fix errors in test_ss.c so it can be an example application and test case
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-02 05:25:23 -05:00
Arun Thomas 20abd3ea2a e2image in raw-mode appends an extra byte to image-file
In raw mode (-r), e2image appends an extra byte to the image-file's
end if the last block requires a sparse write. Consequently, the
resulting image-file is one byte larger than the original in
size. This patch fixes the problem by seeking to one less than the
given offset, so that the byte write does not overflow into the next
block.

This problem can be reproduced by doing an e2image -r dev image-file
and comparing the original and resulting image sizes. This assumes the
image is sparse at the end. For my tests, I created a 100MB sparse
image with two files.

Signed-off-by: Arun Thomas <thomasar@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-11-26 06:26:31 -05:00
Theodore Ts'o 5ea565fd37 Merge basic FLEX_BG support
Merge commit 'c2d4300b8a4a13d8a78b86c386f76259f23feec2' into next
2007-11-03 21:01:01 -04:00
Jose R. Santos c2d4300b8a Enable FLEX_BG feature support
Add FLEX_BG as a supported feature bit.

Add support to mke2fs to create filesystems with FLEX_BG.

Add support to tune2fs to add (and remove, if it won't break
filesystem consistency) the FLEX_BG feature.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--

 lib/e2p/feature.c   |    2 ++
 lib/ext2fs/ext2fs.h |    6 ++++--
 misc/mke2fs.c       |    7 ++++++-
 3 files changed, 12 insertions(+), 3 deletions(-)
2007-11-03 20:40:56 -04:00
Jose R. Santos 88b34b1f87 Relax group descriptor checking for FLEX_BG
The FLEX_BG feature allows the inode table, block bitmap, and inode
bitmaps to be located anywhere in the filesystem.  Update e2fsck and
libext2fs's checking code to recognize this.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--

 e2fsck/super.c          |   14 ++++++++++++--
 lib/ext2fs/check_desc.c |   15 +++++++++++++--
 2 files changed, 25 insertions(+), 4 deletions(-)
2007-11-03 20:13:16 -04:00
Jose R. Santos 4d5cb2ac91 lib/ext2fs/Makefile.in: Reorder some of the $(SRCS) in alphabetical order.
All files under $(OBJS) and $(SRCS) should be in alphabetical order
but this is not always the case.  Let fix some some of these before
applying new files to the list of $(SRCS).

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--

 lib/ext2fs/Makefile.in |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
2007-11-03 13:56:56 -04:00
Jose R. Santos cf0eeec015 Reserve the INCOMPAT feature number for FLEX_BG.
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--

 lib/ext2fs/ext2_fs.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
2007-11-03 12:10:12 -04:00
Theodore Ts'o d9099eec8e Merge branch 'cl/remove-masix' into next 2007-11-01 01:54:22 -04:00
Coly Li 36161c180c mke2fs: remove masix support
This patch remove masix support from mke2fs.

Signed-off-by: Coly Li <coyli@suse.de>
2007-11-01 01:53:56 -04:00
Coly Li 5b57d921b4 e2fsck: remove masix support
This patch remove masix support from e2fsck.

Signed-off-by: Coly Li <coyli@suse.de>
2007-11-01 01:53:56 -04:00
Coly Li c9548bc37e libext2fs: remove masix support
This patch remove masix support from lib/ext2fs.

Signed-off-by: Coly Li <coyli@suse.de>
2007-11-01 01:53:56 -04:00
Coly Li fab7559b3e document: remove masix from data structure
This patch remove masix union from data structure in ext2ed-design.sgml.

Signed-off-by: Coly Li <coyli@suse.de>
2007-11-01 01:53:56 -04:00
Coly Li 227181f88f debugfs: remove masix support
This patch remove masix supporting from debugfs.

Singed-off-by: Coly Li <coyli@suse.de>
--
2007-11-01 01:53:55 -04:00
Theodore Ts'o 3eaf8627b0 Fix typo in the summary section of the blkid man page
Addresses-SourceForge-Bug: #1821333

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-11-01 01:19:32 -04:00
Dmitry V. Levin da938f20ac check_ea_in_inode: Cleanup e2fsck_write_inode_full() call
Avoid pointer cast and call e2fsck_write_inode_full() the same way
as check_inode_extra_space() does.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2007-11-01 00:32:32 -04:00
Dmitry V. Levin 7b7370bd2e blkid.pc, ss.pc: Move private libs from "Libs:" to "Libs.private:"
According to pkg-config(1) manual page, private libraries should be
defined by "Libs.private:" line.  Private libraries are libraries which
are not exposed through our library, but are needed in the case of
static linking.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2007-11-01 00:32:32 -04:00
Dmitry V. Levin 710bac86a5 texinfo: Fix directory entries
According to texinfo documentation, @dircategory and
@direntry...@end direntry commands are more appropriate.

For details see
http://www.gnu.org/software/texinfo/manual/texinfo/html_node/Installing-Dir-Entries.html

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2007-11-01 00:25:02 -04:00
Dmitry V. Levin 3b06802bbb blkid/test_probe.in: Fix temporary files handling
Avoid placing files with predictable names in /tmp.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2007-10-29 10:59:01 -04:00
Dmitry V. Levin d9039ae0ff Check fgets(3) return value
When fgets() function fails, contents of the buffer is undefined.  That
is, fgets() return value needs to be checked, to avoid undefined behavior.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2007-10-29 10:59:01 -04:00
Dmitry V. Levin 84d51a2e99 e2image: Fix potential off-by-one fs_device_name buffer overflow
In write_image_file(), fix length argument of strncat(3) call.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2007-10-29 10:59:01 -04:00
Theodore Ts'o 0033e333f8 Merge branch 'tt/badblocks-cleanup' into next 2007-10-22 18:11:24 -04:00
Theodore Ts'o d4be9fad6e badblocks: Factor out calls to strtoul to a helper function
The strtoul() function has a lot of messy error checking that needs to
be done; by factoring it out into one place we can make sure it's done
right in all of the places where it is called.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-10-22 18:05:32 -04:00
Theodore Ts'o acd77415a9 badblocks: Change unsigned long to blk_t and unsigned int, as appropriate
This will make it easier for us to support 64-bit block numbers when
the time comes.  Not that running badblocks on a > 4TB machine is
anything I want to contemplate!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-10-22 18:05:32 -04:00
Theodore Ts'o e9860ae966 badblocks: Use unsigned int instead of unsigned long for test patterns
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-10-22 18:05:32 -04:00
Theodore Ts'o b5674ff53b badblocks: Factor out calls to strtoul to a helper function
The strtoul() function has a lot of messy error checking that needs to
be done; by factoring it out into one place we can make sure it's done
right in all of the places where it is called.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-10-22 11:55:31 -04:00
Theodore Ts'o 067a115e4b badblocks: Change unsigned long to blk_t and unsigned int, as appropriate
This will make it easier for us to support 64-bit block numbers when
the time comes.  Not that running badblocks on a > 4TB machine is
anything I want to contemplate!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-10-22 11:55:25 -04:00