Commit Graph

174 Commits

Author SHA1 Message Date
Stepan Kasal 232a8ec45a build-sys: remove AC_PROG_RANLIB
libtoolize (1.5.16) says it's now obsolete.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:29 +02:00
Stepan Kasal 1f10890f51 build-sys: declare SUID_CFLAGS and SUID_LDFLAGS as precious
Use AC_ARG_VAR to declare the variables SUID_CFLAGS and SUID_LDFLAGS as
precious.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:29 +02:00
Stepan Kasal 2c4bdb7fca build-sys: fix the example configure call in README
Adapt the example to pass the variables as arguments to the configure
script, as this is the prefered way.  And a few cosmetic changes to the
paragraph.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:29 +02:00
Stepan Kasal 3f3c9c909a build-sys: add SUID_LDFLAGS
Programs which are usually installed with the setuid bit do need their own
CFLAGS and LDFLAGS.  SUID_LDFLAGS is analogic to SUID_CFLAGS.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:29 +02:00
Stepan Kasal 30564097bf build-sys: do not play with DEFS, use AM_CPPFLAGS
If a -D flag is needed, it belongs to AM_CPPFLAGS.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:29 +02:00
Stepan Kasal 8671065ce5 build-sys: move the optimization flags to AM_CFLAGS
The optimization flags are not preprocessor flags.
Moreover, CPPFLAGS and CFLAGS shall be overridable at make time, the
configure script shall not touch them.
Setting AM_CFLAGS in config/include-Makefile.am seems to be TRW.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:29 +02:00
Stepan Kasal 8c453685a6 build-sys: do not kick off AM_CFLAGS by SUID_CFLAGS
SUID_CFLAGS are not meant to override the makefile-wide AM_CFLAGS.
(We do not use AM_CFLAGS currently, but we will.)

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:29 +02:00
Stepan Kasal f0b8b878c3 build-sys: update po/POTFILES.in
Remove mount/nfsmount* files from po/POTFILES.in .

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:28 +02:00
Karel Zak 52a2b29d9b mount: remove nfsmount() from sundries.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-11 15:28:21 +02:00
Karel Zak 11d6b04773 mount: remove all NFS code
Use /sbin/{u,}mount.nfs{,4} from nfs-utils! The mount command
will use these to mount nfs filesystems instead of internal code.

The /sbin/{u,}mount.nfs{,4} is supported from nfs-utils-1.1.0
(currently -rc1).

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-09 13:25:16 +02:00
Stepan Kasal e1bc6da937 build-sys: fix the final message of autogen.sh
The message shall not recommend calling ./configure when srcdir != "." .

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-08 00:39:13 +02:00
Stepan Kasal 5a2300248f build-sys: call automake after autoconf
"automake" calls "autoconf" internally, to trace the expansion of
configure.ac.  So it is more natural to call "autoconf" before
"automake".

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-08 00:38:36 +02:00
Stepan Kasal 040dc88f70 build-sys: remove config.h.in from VCS
config.h.in is generated, no need to keep it.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-08 00:38:24 +02:00
Karel Zak 3a620ba4bf mount: add support for context, fscontext and defcontext selinux mount options
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-04 11:05:51 +02:00
Karel Zak 6573c985a4 mount: use realloc for xstrconcat functions
Everywhere in code is

	s = xstrconcat3(s, t, u);

that's nonsense use malloc(new_s); free(s); return new_s;

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-04 09:14:04 +02:00
Karel Zak 9e28151e70 mount: use growable string for options
The parse_opt() routine uses fixed size of string for mount options.
This is useless for future selinux options where is not well defined
size of selinux context name.

The patch also makes code more readable and all option-string
operations share same code.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-04 00:15:45 +02:00
Karel Zak bb369b1404 mount: avoid duplicate entries in mtab when mount -f
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-02 13:05:14 +02:00
Karel Zak 8d5807b942 tests: add mount -o remount test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-26 22:25:13 +02:00
Karel Zak e4a89b95ad tests: add mount --move test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-26 15:10:00 +02:00
Karel Zak 3d91eb781d mount: doesn't rpc_pipefs and nfsd on umount -a
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-26 11:06:44 +02:00
Karel Zak b2b7b73d5e mount: fix list logic in update_mtab
If mtab does not contain the new entry, then only mc0->prev is updated
to point to absent, but not the old mc0->prev's nxt pointer.  Because
we then use the nxt pointers to write the new mtab, absent is not
added to the new mtab.

(Note: fortunately, the mount doesn't use the update_mtab() for new
mounts, but for remount, move and umount only -- kzak)

If mtab is empty, absent->prev should be set to mc0, and not
mc0->prev, as it will be NULL.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-26 01:49:28 +02:00
Mike Frysinger 1510285d49 mount: fix memory usage in update_mtab
The update_mtab deallocates memory which was allocated by caller. It's nice
opportunity for double-free errors. 

The patch fix a memory leak if we have to abort before mc0 are freed.  The
patch also fix a memory leak when we deallocate old (umounted) entry.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-26 00:31:39 +02:00
Mike Frysinger 3cccadb2f7 mount: do not treat arm/sparc specially.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
2007-04-25 23:59:03 +02:00
Mike Frysinger 6b4d210d04 mount: don't umount sysfs when running umount -a
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
2007-04-25 23:58:41 +02:00
Mike Frysinger 409af84fba po: typo in french translation of mount error.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
2007-04-25 23:57:50 +02:00
Mike Frysinger 5f24e30701 mount: fix -fv so that it doesn't incorrectly spit out an error that nothing was done.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
2007-04-25 23:57:27 +02:00
Karel Zak 2a4b572500 sys-utils: move some man pages from category 8 to 1
The dmesg, ipcrm, ipcs, renice and setsid are user-accessible commands
and belong in man1 more than to man8.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 23:50:52 +02:00
Karel Zak 96f92b00b4 docs: fix info about devel/master branchs
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 15:23:21 +02:00
Karel Zak 9ec6a6b4ad docs: remove deprecated section from README
The deprecated stuff is already described in the DEPRECATED file.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 00:40:28 +02:00
Karel Zak 06bcee19a2 build-sys: add SUID_CFLAGS
The patch allows to define special CFLAGS for typical suid programs
(like mount, umount, chfn, ...). Some distributions use for example
"-fpic" for suid binaries.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 00:20:46 +02:00
Karel Zak dd9f213ab6 mount: add support for mtab "uhelper" option
The helper is an external /sbin/umount.<suffix> program where the
suffix is a value from the uhelper= option from /etc/mtab.

The uhelper (unprivileged umount helper) is possible to used when
non-root user wants to umount a mountpoint which is not defined in the
/etc/fstab file (e.g devices mounted by HAL).

This option is already supported by HAL upstream.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 00:20:40 +02:00
Karel Zak 0b44c6155b mount: update mtab correctly when mount --move
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 00:08:43 +02:00
Karel Zak 09dd84cac7 schedutils: define SCHED_BATCH when compile with old glibc
This is temporary workaround and it will be removed in 2.14 when
minimal number of people will use old systems where is not defined
SCHED_BATCH in (bits/)sched.h.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-11 23:18:08 +02:00
Mike Frysinger f2c166ffdb check exit status of autotools
Make sure each autotool run in autogen.sh worked and if not, abort.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2007-04-11 10:58:12 +02:00
Karel Zak c67f99d754 todo: add request for cal highlight control option
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-06 12:31:40 +02:00
Karel Zak 31cc369d60 todo: add entry about replay
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-06 12:17:43 +02:00
Karel Zak e9998b33cc tests: refresh mtablock output in expected/ directory
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-05 00:34:28 +02:00
Valerie Henson 5e12b670af mount: relative atime support
Add the "relatime" (relative atime) option support to mount.  Relative
atime only updates the atime if the previous atime is older than the
mtime or ctime.  Like noatime, but useful for applications like mutt
that need to know when a file has been read since it was last
modified.

Cc: Adrian Bunk <bunk@stusta.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Karel Zak <kzak@redhat.com>

Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
2007-04-05 00:29:55 +02:00
Matthias Koenig 0df2f5d5aa tests: add missing header
minor patch, which adds a missing string.h header to
mnt_test_sysinfo.c

Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
2007-04-04 12:43:39 +02:00
Matthias Koenig 30ced4e60b misc-utils: add scriptreplay manpage
a really minor patch which adds the manpage for scriptreplay.

Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
2007-04-04 12:42:52 +02:00
Karel Zak 389fbea536 mount: shared-subtree support
This patch builds shared-subtree semantics awareness into the mount
command.  Updates the man page for mount too.

The patch also fix a conflict between MS_COMMENT and MS_UNBINDABLE
(-- kzak).

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
2007-04-03 22:54:47 +02:00
Karel Zak 939a997de0 tests: enable mtablock test when uid=0 only
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-03 22:19:28 +02:00
Karel Zak 72a7145496 docs: add the DEPRECATED file
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-03 22:02:20 +02:00
Karel Zak 72ab6bb4b9 losetup: add to man page info about deprecated cryptoloop
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-03 21:56:55 +02:00
Karel Zak dc8fdc57cd mount: fix mtab_lock
* the lock function uses F_SETLK / F_SETLKW as a conditional wait.
  It's more reliable and better for performance to close the
  MOUNTED_LOCK file in unlock_mtab(), otherwise concurrent process will
  be wait by while () { link() } loop instead on fcntl(F_SETLKW).

  Thanks to Jeff Moyer <moyer@redhat.com> who found the problem two
  year ago.

* when open(MOUNTED_LOCK) failed, we need to try everything again, but
  the original code didn't zeroize "we_created_lockfile" and the old
  version in particular case left lock_mtab() without locked /etc/mtab.
  This is nasty bug.

* the original locking code had bad performance due too long sleep
  (1s),  between attempts. Now we're more aggressive and we use
  5000ms. The result is that more processes is able to lock mtab in
  short time slice.

  Thanks to Peter Rockai <prockai@redhat.com> who found the problem
  and suggest a first version of the code with usleep.

* now we don't count number of attempts anymore, but we count sum of
  time which we spend in the mtab_lock(). The number of attempts is
  not important (and it also depends on CPU performance, load,
  scheduler, ...), the important thing is how long we spend with
  locking. Now time  limit is 30s.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-30 13:10:59 +02:00
Karel Zak 2cd72ac0e0 tests: add lock_mtab() performance and reliability test
The test starts concurrently many processes that use lock_mtab() as
lock for access to same file.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-28 18:43:03 +02:00
Karel Zak 61b2affd6e tests: make clean need to remove diffs and outputs
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-28 17:01:19 +02:00
Karel Zak faf142b65a losetup: add support read-only loops
This feature has been already supported by mount, but it wasn't accessible by
losetup command. Now you can use "losetup -r".

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-22 20:54:07 +01:00
Karel Zak 8b125fae1c losetup: add -a option to list all used loop devices
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-22 14:22:10 +01:00
Karel Zak 460e061dd9 mount: add -s and -f and note to man page for external mount helpers
The mount -s (for nfs only) and -f options must be exported to
external /sbin/mount.<type> helpers.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-22 12:51:47 +01:00