Do not use header swapargs.h, generated by script swap.configure;
use the standard AC_DEFINE method in configure.ac.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
The AC_TRY_* macros are deprecated. Following the suggestion from
autoupdate, I have replaced them by AC_*_IFELSE.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
Merge adjacent calls to AC_CONFIG_HEADERS--the generated configure is
then smaller. Likewise for AC_CONFIG_FUNCS.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
It's redundant to set with_slang=$withval, and similar.
(Inspect the generated configure; it contains
withval=$with_slang; with_slang=$withval
:-)
Signed-off-by: Stepan Kasal <skasal@redhat.com>
Automake mishandles dist_man_MANS. Using dist_noinst_DATA to work
around this is more elegant than using dist-hook.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
The construction with "distclean-local" does not seem necessary.
Moreover, Automake complains when "clean" is redefined.
Simply put the rm to "clean-local".
Signed-off-by: Stepan Kasal <skasal@redhat.com>
Build lib/*.c individually for each project which uses it, so that the
right set of flags is applied each time.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
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>
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>
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>
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>
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>
"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>
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>
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>
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>
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>
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>
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>
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>