Commit Graph

2271 Commits (2c0dd0fa43c4109fc4b7cc1bf9ba623822f2e782)

Author SHA1 Message Date
Theodore Ts'o 2c0dd0fa43 Update release notes, version files for 1.40.4 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-01 00:35:17 -05:00
Theodore Ts'o 1e5c6d34e7 Expand discussion of the -D option in e2fsck's man page
Add an explanation of how e2fsck might decide to optimize a few
directories even without the -D option being specified.

Addresses-Debian-Bug: #441872

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-01 00:22:46 -05:00
Theodore Ts'o ffff966438 debian: Fix the document ID in comerr_dev.doc-base
The old document ID, com_err, used an illegal character ('_'); change
it to be comerr-manual to be conformant with the doc-base requirements.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 23:35:10 -05:00
Theodore Ts'o 904dad55e6 Update dependencies in lib/uuid/Makefile.in
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 23:12:35 -05:00
Theodore Ts'o 46e770b2e2 debian: Use useradd and groupadd in favor of adduser
The adduser package is 'important', and while it is often installed,
we can't guarantee that it will always be there.  A required package,
or a package which is dragged in by a required package, such as
libuuid1, shouldn't depend on an 'important' package since that would
implicitly make it be required, which shouldn't be done unless
absolutely necesary.

So we replace the call to adduser with the lower-level useradd and
groupadd programs.  They are part of the passwd package, which is
required to be on all Debian systems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 22:35:18 -05:00
Theodore Ts'o a827a2a3a7 debian: build the e2fsck-static package so it works on 2.4 kernels
Some people are still running ancient Debian distributions, such as
woody, with a 2.4 kernel, and they want to be able to use the
e2fsck-static package on backlevel systems.

It turns out that we can't just statically link against glibc anymore,
since glibc now uses thread-local storage everywhere.  So we now build
e2fsck-static using dietlibc.

Addresses-Debian-Bug: #458017

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 22:35:18 -05:00
Theodore Ts'o 9320c6ffcd Fix build error in blkid/tst_types.c when using diet libc
When compiling with diet libc, <sys/types.h> must be included in order
to define the types used in asm/types.h.  Strange choice, but
workable.  This doesn't cause much problems for e2fsprogs except
blkid/tst_types.h, which needed a #include of <sys/types.h>.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 22:35:18 -05:00
Theodore Ts'o 29dd9d1e90 Test for sys/syscall.h in configure to fix dietlibc build problem
When compiling with dietlibc, sys/syscall.h isn't supported; as of
dietlibc 0.30, it exists but it references a non-existent asm/unistd.h
header file.  So we have to test for its existence and avoid using it
in lib/uuid/gen_uuid.c if it is not supported.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 22:34:25 -05:00
Theodore Ts'o 61a679d4d7 debian: Do not use TLS or uuidd when building the bootfloppy udeb's
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 22:34:19 -05:00
Theodore Ts'o 5610f9924b Add --disable-uuidd configure option
Add a configure option which causes the uuidd helper daemon not to be
built or used by the uuid library.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 22:34:19 -05:00
Theodore Ts'o 3249394d43 Add --disable-tls configure option
Add option to forcibly disable the use of thread local storage

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 22:34:19 -05:00
Theodore Ts'o 3306861158 Fix build failure on non-Linux/non-Hurd/non-Masix systems
inode_uid() and inode_gid() weren't getting defined on systems that
were not Linux, Hurd, or Masix.

Addresses-Sourceforge-Bug: #1859778

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 22:33:56 -05:00
Theodore Ts'o e5aace908e Convert use of ext2fs_get_mem to ext2fs_get_array for overflow detection
Add some additional checks, primarily in resize2fs and in the rarely
used (and soon to-be-deprecated) e2fsck byte-swap filesystem function.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-27 10:08:13 -05:00
Theodore Ts'o 20ca0f6e40 Update Vietnamese translation from the Translation Project
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-25 14:22:47 -05:00
Theodore Ts'o 113d636a2b uuidd: Avoid race conditions to that only one uuidd is started
Use an improved locking protocol based on the pid file to assure that
only one uuidd is started.  Apparently the kernel does not prevent
multiple processes from racing to bind to a Unix domain socket.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-25 14:19:15 -05:00
Theodore Ts'o f79fb4976c libuuid: Fix bug which caused uuidd to fail if sizeof(int) != sizeof(int *)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-21 11:32:48 -05:00
Theodore Ts'o 3166c58dc0 Add #define needed for Hurd ioctl definitions
Addresses-Debian-Bug: #437720

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-17 23:03:53 -05:00
Theodore Ts'o f91f55f583 debian: Add a dependency on libuuid1 to the uuid-runtime package
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-17 15:31:19 -05:00
Theodore Ts'o d37a4fa788 libuuid: Only try to start the uuidd daemon a limited number of times
If we fail to create the uuidd daemon after 5 or 6 tries, another
10,000 tries probably won't be successful.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-17 15:26:47 -05:00
Theodore Ts'o 9d8c203a46 libuuid: When starting uuidd, use waitpid() to reap the zombie process
The uuidd process will fork and let the parent process exit to create
the daemon.  So use waitpid to reap the zombie, as well as using it to
time when it is safe to try to connect to the daemon.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-17 15:16:44 -05:00
Theodore Ts'o 2165003bd5 uuidd: Use /var/lib/libuuid instead of /var/run/uuidd
/var/run can get completely removed at reboot, and uuidd doesn't have
permissions to recreate /var/run/uuidd.  So instead use
/var/lib/libuuidd for the unix domain socket and pid files.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-17 15:12:04 -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 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 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
Theodore Ts'o f305918cc7 mke2fs: Change usage message to use -E instead -R, which is deprecated
The -R option is only used for backwards compatibility, and -E is
preferred, so change the usage message accordingly.

Signed-off-by: Coly Li <coyli@suse.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-10-15 16:23:40 -04:00
Eric Sandeen f493d4e0ac libblkid: recognize squashfs filesystems on BE systems.
squashfs has no uuid or labels, so all we need is the magic
(for big-endian too!)

Addresses-Red-Hat-Bugzilla: #305151

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
2007-10-15 16:23:39 -04:00
Eric Sandeen 5845efd123 libblkid: detect squashfs
libblkid: recognize squashfs filesystems

squashfs has no uuid or labels, so all we need is the magic.

Addresses-Red-Hat-Bugzilla: #305151

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
2007-10-14 10:11:52 -04:00
Theodore Ts'o 0c37f456d9 e2fsck: backup superblocks if key constants have changed
If the primary superblock differs from the backup superblock in
certain key respects, force a full check (if e2fsck was invoked in
preen mode).  If the filesystem check passes cleanly, and the
filesystem was opened in read/write mode, then write the primary
superblock to all of the backups.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-10-06 12:39:57 -04:00