Commit Graph

907 Commits

Author SHA1 Message Date
Signed-off-by: Roy Peled fbaec83bc0 mkfs.cramfs: add endianness support to cramfs tools
cramfs is an endianness dependent file system.  So far, the cramfs
utilities did not support cramfs images of different endianness than
the host machine.

A separate utility, cramfsswap, was required in order to change the
endianness of the image before and after using cramfs utilities. The
extra utility introduced extra maintenance and an additional step in
the process.

This patch adds endianness support to mkfs.cramfs and fsck.cramfs.
fsck.cramfs now automatically detects the image endianness, and can
work on images of either endianness.  mkfs.cramfs now accepts a new
optional parameter (-N) that allows creating the cramfs image in
either endianness.

Signed-off-by: Roy Peled <the.roy.peled@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-04 14:56:54 +01:00
Karel Zak 0959f8063b mount: non-setuid (POSIX file capabilities) support
The mount command does not work properly if you replace suid with
POSIX file capabilities. We still need to check for non-root mounts and
the command has to work in very restricted mode for non-root users.

This patch allows you to remove suid bit from mount and umount. Note
that you need a system with filesystem capability support, e.g.
Fedora 10).

# ls -l /bin/mount
-rwxr-xr-x 1 root root 65192 2008-11-09 22:59 /bin/mount

# getcap /bin/mount
/bin/mount = cap_dac_override,cap_sys_admin+ep

[kzak@redhat.com: all the above comments]


Don't bypass security checks when [u]mount uses POSIX file capabilities
rather than setuid root to permit non-root mounts.

Signed-off-by: Geoff Johnstone <geoff.johnstone@googlemail.com>
2009-02-04 12:50:14 +01:00
Karel Zak 9ca1a11bf9 fdisk: add 0xaf HFS / HFS partition type
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-04 12:39:02 +01:00
Karel Zak 6c00cbbe97 chrt: output buglet when reporting scheduling class
% chrt -i 0 ./a.out &
[1] 60479
% chrt -p 60479
pid 60479's current scheduling policy: SCHED_IDLE
SCHED_RR
pid 60479's current scheduling priority: 0

We have a spurious and incorrect SCHED_RR in there...

Address-Red-Hat-Bugzilla: #483706
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-03 10:22:07 +01:00
Karel Zak 97fd43f5d3 ionice: fix typo in manpage
Reported-by: Jakob Unterwurzacher <jakobunt@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-02 11:21:04 +01:00
Karel Zak 19ac06a5c0 mount: fix typo in volume_id code
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-31 01:50:26 +01:00
Karel Zak a0d4e9d91b rtcwake: add mising .RE to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-29 17:47:20 +01:00
Karel Zak 06b2b6af77 namei: add missing options to namei.1
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-27 15:00:35 +01:00
Karel Zak c3ecdb3ea4 namei: add --vertical option
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-27 14:48:32 +01:00
Karel Zak 8e88e8fc1e rtcwake: explain supported modes in rtcwake.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-26 22:00:22 +01:00
Marco d'Itri e4b0fc36ff rtcwake: support not suspending
People usually want to use pm-utils to suspend the system instead of
the raw kernel interface, so I added an option to just exit after
configuring the wakeup time.
Actually I think that all the suspend code should be removed from
rtcwake, since it does not really belong there.

Signed-off-by: Marco d'Itri <md@linux.it>
2009-01-26 21:22:24 +01:00
Karel Zak 922a121b60 namei: don't duplicate '/' directory
sake@lelux ~ namei -l /
f: /
 drwxr-xr-x root root /
 drwxr-xr-x root root

The duplicate '/' directory is unexpected behavior.

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-26 11:36:31 +01:00
Karel Zak 9bc0e24612 ionice: a little cleanup of "none" description
We practically have three io scheduling classes. The "none" is
de facto "best-effort" class for processes that has not asked
for io priority.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-22 15:27:47 +01:00
Sukadev Bhattiprolu 22b51bd22d mount: document newinstance and ptmxmode options to devpts
Support for multiple instances of devpts were included in 2.6.29-rc1.
Update man pages to document the new options. Additional details about
the new options are described in 'Documentation/filesystems/devpts.txt'
of kernel source tree.

Reviewed-by: WANG Cong <wangcong@zeuux.org>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-21 13:06:53 +01:00
Sam Varshavchik 78e7f4ec68 mount: cleans up mount(8) troff markup
My patches correct troff markup only. No content changes.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-16 14:47:09 +01:00
Jakob Unterwurzacher 9b93a22389 ionice: Extend the man page to explain the "none" class and cpu-nice inheritance
Extend the ionice man page to explain the "none" class and how the
cpu-nice => io-priority inheritance works.

Signed-off-by: Jakob Unterwurzacher <jakobunt@gmail.com>
2009-01-16 13:47:56 +01:00
Adam Jackson 11ea22d5a3 dmesg: Add -r (raw) option.
Useful for debugging which kernel messages are ruining your quiet
bootup.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2009-01-16 12:34:49 +01:00
Karel Zak 448d12483c umount: cleanup gefs_by_specdir()
fix:
 - don't call canonicalize_spec() for LABELs/UUIDs
 - simplify the code
 - rename to getfs_by_devdir(), because we use it only for
   device names and not for SPECes (see umount.c).

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-07 00:18:41 +01:00
Karel Zak b2cf00d440 mount: finalize support of quoted LABELs/UUIDs
The [u]mount does not properly support LABEL="foo" or UUID="foo" in
/etc/fstab. This patch fix last places where we assume unquoted
LABELs/UUIDs only.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-07 00:00:35 +01:00
Karel Zak f0daecf3c5 mount: suggest to use blockdev --setro rather than losetup
Thanks to Christoph Hellwig.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-06 15:20:37 +01:00
Karel Zak 370dc7a23e mount: add info about semantics of read-only mount to mount.8
Reported-by: Joachim Wagner <jwagner@computing.dcu.ie>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-06 14:39:58 +01:00
Karel Zak f7ed29a7b6 namei: fix buffer overflow
$ ./namei  /usr/bin/java
 *** glibc detected *** ./namei: free(): invalid next size (fast): 0x00000000018e5070 ***
 [...]
 Aborted

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-01-06 14:26:12 +01:00
Karel Zak 6db4681802 raw: default to /dev/raw/rawctl
The raw devices are in the raw/ subdirectory. It makes sense to use
the same subdirectory also for the control file. The old /dev/rawctl
is also supported as a fallback.

The #ifdef OLD_RAW_DEVS (/dev/raw<N>) is unsupported from now.

Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-26 01:13:03 +01:00
Karel Zak b80d3b31df mount: add rootcontext= SELinux mount option
Note, the description in the mount.8 man page is copy & paste from
rootcontext= kernel patch (by James Morris). I didn't found anything
more useful... (patches welcomed:-)

Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-22 18:46:45 +01:00
Karel Zak f1b3f066f7 mount: clean up SPEC canonicalization
The SPEC (fsname) field in fstab/mtab could be:

 - devname
 - NAME=value (e.g LABEL, UUID)
 - directory (MS_MOVE, MS_BIND, ..)
 - pseudo-fs keyword (tmpfs, proc, sysfs, ...)

the pseudo-fs keywords shouldn't be canonicalized to absolute path. It
means we have to differ between SPEC and mountpoint (fs_dir).

Unfortunately, the keywords was checked on wrong place. This patch
move this check to the new function canonicalize_spec().

The fsname in mtab entry is canonicalized when the FS type is not
pseudo filesystem.

Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-19 12:45:20 +01:00
Karel Zak a7d70ba715 fdisk: remove unnecessary gettext call
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-12 15:20:06 +01:00
Karel Zak 126836e852 pg: add gettext call for the help string
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-12 15:13:44 +01:00
Karel Zak 1205b9fe5f refresh gitignore
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-12 15:03:18 +01:00
Karel Zak 2449f6b0fa simpleinit: cleanup gettext calls, use snprintf()
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-12 15:01:15 +01:00
Karel Zak 26fb9222c4 chfn: several strings without gettext calls
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-12 14:44:04 +01:00
Karel Zak 12318be41b TODO: add request to use nl_langinfo()
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-12 14:41:34 +01:00
Karel Zak ad067f1625 Revert "login-utils: several strings without gettext calls"
This reverts commit 64fefaf5bf.

It does not make sense to localize config options (wdays in
checktty.c) and debug messages (main() in checktty.c.
2008-12-12 14:33:29 +01:00
Karel Zak 4b7473c30f mount: fix mount_static_LDADD
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-12 14:04:19 +01:00
Karel Zak 9775d40fff tests: add md5 regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-08 12:36:07 +01:00
Karel Zak 8bce47d976 include: use __BYTE_ORDER rather than AC specific WORDS_BIGENDIAN
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-08 11:16:37 +01:00
Karel Zak 6fc2c88210 lib: add __BYTE_ORDER to md5.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-08 11:12:30 +01:00
Karel Zak 788a14403d tests: add MD5 regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-06 01:43:55 +01:00
Karel Zak 0112925a99 tests: add swabN() regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-05 16:27:19 +01:00
Karel Zak dee98cdedc include: swapheader.h is missing in Makefile.am
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-05 15:53:40 +01:00
Karel Zak 727b3c2f26 mkfs.minix: (and fsck) rename bitops.h
This patch renames bitops.h to minix_bitops.h to avoid possible
collisions with global include/bitops.h file.

Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-05 14:38:54 +01:00
Karel Zak 43f2d5bcbc build-sys: add missing AC_C_BIGENDIAN
This configure test is required in include/bitops.h.

Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-05 14:01:12 +01:00
Matthias Koenig 3399a218f4 swapon: add swap format detection and pagesize check
As swap format depends on the pagesize being used, it may happen
that the pagesize of the swap space and the current pagesize differ,
resulting in swapon to fail when trying to enable such a swap space.
In such a case swapon should rather reinitialize the swap space.

[kzak@redhat.com: - add blkdev.c to the global swapon_SOURCES
                  - don't try to detect for huge pages on small swap
                    areas (or when read() returns less than MAX_PAGESIZE)
                  - fix fprintf() format string]

Co-Author: Olaf Hering <olh@suse.de>
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-05 12:54:12 +01:00
Matthias Koenig d60819b36d include: move swapheader.h to include
[kzak@redhat.com: add ifndef _SWAPHEADER_H]

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-05 11:51:40 +01:00
Mike Frysinger 3933bc2e4a mount: remove spurious newline from mount.8
The man page display shows quote marks instead of being interpreted by the
.B statement and hidden away due to a spurious newline.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-12-05 11:45:23 +01:00
Karel Zak e273df94ba setterm: fix -blank man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-05 11:41:28 +01:00
Alexey Gladkov ff5717391c flock: Allow lock directory
With this patch, you can lock directory. Additionally,
lockfile opens with O_NOCTTY.

Try to open file with O_CREAT flag first, and without it
if open fails with EISDIR.  Suggested by H. Peter Anvin.

Signed-off-by: Alexey Gladkov <legion@altlinux.org>
2008-12-03 10:33:53 +01:00
Karel Zak 8da18ddb81 docs: add feature-requests from RH bugzilla to TODO list
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-02 14:27:37 +01:00
Karel Zak 97e83bfe9e mount: use subsections in mount.8 DESCRIPTION
The DESCRIPTION section is huge non-structuralized mess. This patch is
attempt to make this part of the man page more readable.

Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-27 14:22:43 +01:00
Karel Zak 464bb99400 mount: create separate section for fs-independent options in mount.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-27 13:29:44 +01:00
Karel Zak b825eb893b mount: reorder list of options in mount.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-27 13:03:25 +01:00