]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
13 years agosu: remove unused code
Ludwig Nussel [Fri, 1 Jun 2012 12:51:20 +0000 (14:51 +0200)] 
su: remove unused code

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
13 years agosu: replace PAM_BAIL_P macro with better solution
Ludwig Nussel [Fri, 1 Jun 2012 12:51:19 +0000 (14:51 +0200)] 
su: replace PAM_BAIL_P macro with better solution

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
13 years agosu: introduce xsetenv globally
Ludwig Nussel [Fri, 1 Jun 2012 12:51:18 +0000 (14:51 +0200)] 
su: introduce xsetenv globally

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
13 years agosu: use ENV_PATH resp ENV_SUPATH to be consistent with login
Ludwig Nussel [Fri, 1 Jun 2012 12:51:17 +0000 (14:51 +0200)] 
su: use ENV_PATH resp ENV_SUPATH to be consistent with login

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
13 years agosu: use EXIT_FAILURE consistently
Ludwig Nussel [Fri, 1 Jun 2012 12:51:16 +0000 (14:51 +0200)] 
su: use EXIT_FAILURE consistently

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
13 years agosu: don't use custom MAX macro
Ludwig Nussel [Fri, 1 Jun 2012 12:51:15 +0000 (14:51 +0200)] 
su: don't use custom MAX macro

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
13 years agolibblkid: add dm-verity hash device detection
Milan Broz [Fri, 1 Jun 2012 11:34:08 +0000 (13:34 +0200)] 
libblkid: add dm-verity hash device detection

dm-verity can use separate device for hash verification,
in this case there is a superblock in the first sector.

See
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/device-mapper/verity.txt
for more info.

Signed-off-by: Milan Broz <mbroz@redhat.com>
13 years agolib/strutils: circumvent missing localeconv()
maximilian attems [Thu, 31 May 2012 17:40:49 +0000 (19:40 +0200)] 
lib/strutils: circumvent missing localeconv()

Add stub too nls.h, include it instead of locale.h.
Code in strutils handles already returned NULL.

Signed-off-by: maximilian attems <max@stro.at>
13 years agoMerge branch 'su.1' of https://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Tue, 5 Jun 2012 12:47:00 +0000 (14:47 +0200)] 
Merge branch 'su.1' of https://github.com/kerolasa/lelux-utiliteetit

* 'su.1' of https://github.com/kerolasa/lelux-utiliteetit:
  docs: rewrite su.1 manual
  docs: fix email macro in manual example
  docs: add su.1 manual page

13 years agodmesg: fix typo in man page
Karel Zak [Tue, 5 Jun 2012 12:40:10 +0000 (14:40 +0200)] 
dmesg: fix typo in man page

Reported-by: Hemant Borole <hemantborole@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoFix typos in comments and wall's man page
Bernhard Voelker [Tue, 29 May 2012 17:06:50 +0000 (19:06 +0200)] 
Fix typos in comments and wall's man page

Culprits identified again by (newer) misspellings:

  $ git ls-files | misspellings -f - | grep -v '^po/'

* wall: Fix typo in man page.
* Fix typos in source code comments.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
13 years agotext-utils/hexsyntax.c: fix for missing program_invocation_short_name
Andreas Bießmann [Mon, 4 Jun 2012 11:01:09 +0000 (13:01 +0200)] 
text-utils/hexsyntax.c: fix for missing program_invocation_short_name

Some libc do not expose program_invocation_short_name. Therefore util-linux
comes with helpers in 'c.h'. Use the 'c.h' in hexsyntax.c where it was missed.

This patch fixes following error for me:
---8<---
hexsyntax.c: In function 'newsyntax':
hexsyntax.c:115: error: 'program_invocation_short_name' undeclared (first use in this function)
hexsyntax.c:115: error: (Each undeclared identifier is reported only once
hexsyntax.c:115: error: for each function it appears in.)
--->8---

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
13 years agomore: fix regex error messages printing
Karel Zak [Tue, 5 Jun 2012 12:19:13 +0000 (14:19 +0200)] 
more: fix regex error messages printing

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomore: remove a meaningless test
Jeremy Huntwork [Wed, 23 May 2012 21:51:15 +0000 (17:51 -0400)] 
more: remove a meaningless test

regexec only returns 0 or REG_NOMATCH so remove a meaningless test

Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: rewrite su.1 manual
Ludwig Nussel [Sat, 2 Jun 2012 05:10:12 +0000 (07:10 +0200)] 
docs: rewrite su.1 manual

Converting coreutils info page to manual did not result as good
manual pages as writing almost completely new.  Ludwig wrote the
text, Sami cleaned up groff syntax.

Reference: http://www.spinics.net/lists/util-linux-ng/msg06321.html
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: fix email macro in manual example
Sami Kerola [Wed, 30 May 2012 17:49:37 +0000 (19:49 +0200)] 
docs: fix email macro in manual example

URL macro is not email address macro.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: add su.1 manual page
Sami Kerola [Wed, 30 May 2012 17:44:45 +0000 (19:44 +0200)] 
docs: add su.1 manual page

The manual page is almost one to one copy with GNU Coreutils 'su
invocation' info page.  This manual also includes few examples, fix
to return values, hint about PAM configuration file, authors and see
also sections.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: move configure login options to one place
Karel Zak [Tue, 29 May 2012 13:24:04 +0000 (15:24 +0200)] 
build-sys: move configure login options to one place

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add --enable-vipw
Karel Zak [Tue, 29 May 2012 13:20:44 +0000 (15:20 +0200)] 
build-sys: add --enable-vipw

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add --enable-newgrp
Karel Zak [Tue, 29 May 2012 13:15:38 +0000 (15:15 +0200)] 
build-sys: add --enable-newgrp

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add --disable-su
Karel Zak [Tue, 29 May 2012 12:54:06 +0000 (14:54 +0200)] 
build-sys: add --disable-su

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add --enable-chfn-chsh
Karel Zak [Tue, 29 May 2012 12:41:01 +0000 (14:41 +0200)] 
build-sys: add --enable-chfn-chsh

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add --disable-login
Karel Zak [Tue, 29 May 2012 12:14:38 +0000 (14:14 +0200)] 
build-sys: add --disable-login

... to implement fine-grained control on what is built from
login-utils.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agosu: remove program_name
Karel Zak [Tue, 29 May 2012 10:53:46 +0000 (12:53 +0200)] 
su: remove program_name

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agosu: fix compiler warning [-Wunused-parameter]
Karel Zak [Tue, 29 May 2012 09:01:23 +0000 (11:01 +0200)] 
su: fix compiler warning [-Wunused-parameter]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: remove -DUSE_PAM=1 for su(1)
Karel Zak [Tue, 29 May 2012 08:51:29 +0000 (10:51 +0200)] 
build-sys: remove -DUSE_PAM=1 for su(1)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agosu: Mention SUID_* feature.
Thomas Schwinge [Fri, 25 May 2012 18:41:01 +0000 (20:41 +0200)] 
su: Mention SUID_* feature.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
13 years agosu: Add AM_LDFLAGS to su_LDFLAGS.
Thomas Schwinge [Fri, 25 May 2012 18:41:00 +0000 (20:41 +0200)] 
su: Add AM_LDFLAGS to su_LDFLAGS.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
13 years agosu: Don't include the unused <sys/fsuid.h>
Thomas Schwinge [Tue, 29 May 2012 08:49:01 +0000 (10:49 +0200)] 
su: Don't include the unused <sys/fsuid.h>

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoMerge branch 'su-v1' of https://github.com/lnussel/util-linux
Karel Zak [Tue, 29 May 2012 08:43:56 +0000 (10:43 +0200)] 
Merge branch 'su-v1' of https://github.com/lnussel/util-linux

* 'su-v1' of https://github.com/lnussel/util-linux: (105 commits)
  use existing logindefs.c and pathnames.h
  syslog always
  remove non pam code
  make su build as part of util-linux
  call setsid() when called with -c
  make sure /sbin resp /usr/sbin are in PATH
  honor settings in /etc/default/su resp /etc/login.defs
  set sane default path
  log all su attempts
  pam support for su
  Help translators include translation team's web or email address. * src/system.h (emit_bug_reporting_address): New function. * src/base64.c: Use it rather than a literal printf. * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c: * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c: * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c: * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c: * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c: * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c: * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c: * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c: * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c: * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c: * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c: * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c: * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c: * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c: * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c: * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c: * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c: * src/who.c, src/whoami.c, src/yes.c: Likewise.
  Don't include dirname.h, since system.h does it now.
  Add a bootstrap procedure, so that the CVS version contains fewer files and we bootstrap the rest from gnulib, gettext, etc. * README-cvs: New file. * bootstrap: New file. * bootstrap.conf: New file. * .x-sc_trailing_blank: Remove config-log, .gdb-history.  Add .po. * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit of gnulib-tool. (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL): (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib. (gl_EARLY): Add. (gl_MACROS): Call just after gl_EARLY, just for clarity. * src/c99-to-c98.diff: Remove patch to ls.c; no longer needed. * src/kill.c (strtoimax): Remove decl. * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves. * src/wc.c: Likewise. * src/ls.c (sort_files): Rewrite to avoid need for C99-style declaration, so that we don't need to patch this file. * src/printf.c (strtoimax, strtoumax): Remove decls. * src/su.c: Include getpass.h. (getpass): remove. * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h. Include inttypes.h unconditionally; remove decls it handles. * lib/Makefile.am: include gnulib.mk, so that we can remove most of this file. (AM_CPPFLAGS): Don't mention -I$(srcdir), since that's now done for us. (noinst_LIBRARIES, LDDADD, DEFS): Remove. (libcoreutils_a_SOURCES): Trim down greatly, just to the files that aren't in gnulib. Remove defns gnulib does for us. * m4/check-decl.m4 (gl_CHECK_DECLS): Don't include stdio.h, string.h, stdlib.h, unistd.h, sys/time.h, time.h.  Use AC_CHECK_DECLS_ONCE for free, getenv, geteuid, getlogin, getuid, lseek, malloc, memchr, realloc.  Don't check for getutent, memrchr, nanosleep, stpcpy, strndup, strnlen, strstr, strtoul, strtoull. (_gl_DECL_HEADERS): Remove; all uses removed. * m4/jm-macros.m4 (gl_MACROS): Move AC_PREREQ into configure.ac for the benefit of gnulib-tool.  Call gl_INIT. Do not call or require macros that gnulib will handle for us. Don't check for fchmod, hasmntopt, isascii, lchown, listmntent, mempcpy, realpath, wcrtomb, tzset. (gl_CHECK_ALL_HEADERS): Don't check for sys/statvfs.h, sys/vfs.h, sys/mount.h. (gl_CHECK_ALL_TYPES): Require AC_TYPE_UNSIGNED_LONG_LONG_INT. Don't check for struct stat.st_blksize. Don't require AC_STRUCT_ST_DM_MODE, gt_TYPE_SSIZE_T, gl_AC_TYPE_UINT32_T, gl_AC_TYPE_UINTMAX_T, gl_AC_TYPE_UINTPTR_T, gl_AC_TYPE_UNSIGNED_LONG_LONG. * m4/prereq.m4 (gl_PREREQ): Require gl_FUNC_XFTS, gl_ROOT_DEV_INO. Don't require macros that gnulib does for us. * m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Don't check for sys/sysmacros.h.  Don't check for statvfs.  Use AC_CHECK_HEADERS_ONCE for netinet/in.h, nfs/nfs_clnt.h, nfs/vfs.h. Don't require gl_AC_TYPE_LONG_LONG, gt_HEADER_INTTYPES_H.
  * src/su.c (usage): Correct typo in --help output: s/commmand/command/ Reported by Tim Waugh. Also remove the comment duplicating much of --help output.
  (log_su, run_shell): Use new last_component, in place of base_name.
  Remove unnecessary parens in `#if defined (SYMBOL)' expressions.
  Update FSF postal mail address.
  Update FSF postal mail address.
  (run_shell): Pass a new n_additional_args arg, so that the callee doesn't have to count 'em.  All callers changed. Don't allocate more space for the arg vector than we'll need. Use memcpy to copy the args rather than rolling our own loop. Use size_t for sizes. (fast_startup, simulate_login, change_environment, log_su, correct_password, restricted_shell, main): Use bool for booleans. (longopts): Don't assume change_environment is an int. Use NULL, not 0, for pointers. (xsetenv): New function, replacing xputenv and concat. All callers changed. (elements): Remove; no longer needed. (log_su, correct_passwd, main): Prefer !x to x==NULL. (log_su): 2 -> STDERR_FILENO. (modify_environment, main): Don't assume that getenv's returned value has an indefinite lifetime. (modify_environment): Allocate a larger environ. (main): Remove an impossible 'case 0'; if it happens now, it'll get diagnosed.  Don't assume getpwnam results outlive endpwent. Check for null or empty pw_name, pw_dir and for null pw_passwd.
  (correct_password, restricted_shell, main): Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.
  ...

13 years agosetsid: Include <sys/ioctl.h> instead of <termio.h>.
Thomas Schwinge [Fri, 25 May 2012 18:16:18 +0000 (20:16 +0200)] 
setsid: Include <sys/ioctl.h> instead of <termio.h>.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
13 years agowrite: Don't explicitly include <asm/param.h>.
Thomas Schwinge [Fri, 25 May 2012 18:16:17 +0000 (20:16 +0200)] 
write: Don't explicitly include <asm/param.h>.

It doesn't exist on some systems, but will come in via <sys/param.h> on the
others.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
13 years agowrite: Use PATH_MAX instead of MAXPATHLEN, as elsewhere.
Thomas Schwinge [Fri, 25 May 2012 18:16:16 +0000 (20:16 +0200)] 
write: Use PATH_MAX instead of MAXPATHLEN, as elsewhere.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
13 years agologin: Include <linux/major.h> only if it exists.
Thomas Schwinge [Fri, 25 May 2012 18:16:15 +0000 (20:16 +0200)] 
login: Include <linux/major.h> only if it exists.

It isn't required on non-Linux systems.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
13 years agoinclude/c: move fallback for MAXHOSTNAMELEN to c.h
Karel Zak [Tue, 29 May 2012 08:08:25 +0000 (10:08 +0200)] 
include/c: move fallback for MAXHOSTNAMELEN to c.h

Reported-by: Thomas Schwinge <thomas@codesourcery.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologger: use memcpy instead of bcopy
Dave Reisner [Mon, 28 May 2012 18:02:59 +0000 (14:02 -0400)] 
logger: use memcpy instead of bcopy

bcopy is marked legacy in POSIX.1-2001 and should not be used.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agoarch, eject, elvtune: Gracefully disable on non-Linux platforms.
Thomas Schwinge [Fri, 25 May 2012 18:16:13 +0000 (20:16 +0200)] 
arch, eject, elvtune: Gracefully disable on non-Linux platforms.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
13 years agokill, raw, rename: Don't explicitly enable for --enable-most-builds.
Thomas Schwinge [Fri, 25 May 2012 18:16:12 +0000 (20:16 +0200)] 
kill, raw, rename: Don't explicitly enable for --enable-most-builds.

They're already dealt with in the default configuration.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
13 years agolib/pager: repair build for non-Linux.
Thomas Schwinge [Fri, 25 May 2012 18:13:41 +0000 (20:13 +0200)] 
lib/pager: repair build for non-Linux.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
13 years agokill: Check the correct variable when configuring.
Thomas Schwinge [Fri, 25 May 2012 18:11:22 +0000 (20:11 +0200)] 
kill: Check the correct variable when configuring.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
13 years agologger: mark decode/pencode as static
Dave Reisner [Wed, 23 May 2012 20:36:00 +0000 (16:36 -0400)] 
logger: mark decode/pencode as static

Move these functions to the top of the file where they can be marked
static and the prototypes can be removed.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agologger: avoid explicit fclose(stdout)
Dave Reisner [Wed, 23 May 2012 20:35:58 +0000 (16:35 -0400)] 
logger: avoid explicit fclose(stdout)

This is done for us via an atexit hook since c05a80ca6385b8. Avoids a
useless 'Write error' on exit whenever invoking the tool.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agomount: (new) fix MS_REC usage
Karel Zak [Mon, 28 May 2012 17:54:16 +0000 (19:54 +0200)] 
mount: (new) fix MS_REC usage

 # mount -R /mnt/test /mnt/test
 mount: propagation flags (--make-* or --bind options) are mutually exclusive

Reported-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: add losetup/mount encryption test
Karel Zak [Mon, 28 May 2012 11:44:55 +0000 (13:44 +0200)] 
tests: add losetup/mount encryption test

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add MNT_ERR_MOUNTOPT
Karel Zak [Mon, 28 May 2012 10:49:55 +0000 (12:49 +0200)] 
libmount: add MNT_ERR_MOUNTOPT

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: (new) add loopdev specific error message
Karel Zak [Mon, 28 May 2012 10:26:41 +0000 (12:26 +0200)] 
mount: (new) add loopdev specific error message

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add MNT_ERR_LOOPDEV
Karel Zak [Mon, 28 May 2012 10:26:36 +0000 (12:26 +0200)] 
libmount: add MNT_ERR_LOOPDEV

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: (old) fix encryption= usage
Karel Zak [Mon, 28 May 2012 09:37:36 +0000 (11:37 +0200)] 
mount: (old) fix encryption= usage

Addresses: https://github.com/karelzak/util-linux/issues/12
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolosetup: more verbose failed setup error mesage
Karel Zak [Mon, 28 May 2012 09:36:59 +0000 (11:36 +0200)] 
losetup: more verbose failed setup error mesage

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agouse existing logindefs.c and pathnames.h
Ludwig Nussel [Fri, 25 May 2012 08:54:23 +0000 (10:54 +0200)] 
use existing logindefs.c and pathnames.h

I'm not sure having /usr/local in _PATH_DEFPATH_ROOT and even putting it
in front is such a good idea though. /usr/local might be on NFS so could
prevent root from logging in if the network is down.

13 years agosyslog always
Ludwig Nussel [Fri, 25 May 2012 08:21:09 +0000 (10:21 +0200)] 
syslog always

13 years agoremove non pam code
Ludwig Nussel [Fri, 25 May 2012 08:20:57 +0000 (10:20 +0200)] 
remove non pam code

13 years agomake su build as part of util-linux
Ludwig Nussel [Wed, 15 Feb 2012 16:28:28 +0000 (17:28 +0100)] 
make su build as part of util-linux

13 years agocall setsid() when called with -c
Tim Waugh [Fri, 10 Jun 2011 12:13:59 +0000 (14:13 +0200)] 
call setsid() when called with -c

Prevents command injection via TIOCSTI

https://bugzilla.redhat.com/show_bug.cgi?id=173008

13 years agomake sure /sbin resp /usr/sbin are in PATH
Werner Fink [Tue, 17 Aug 2010 07:09:55 +0000 (09:09 +0200)] 
make sure /sbin resp /usr/sbin are in PATH

13 years agohonor settings in /etc/default/su resp /etc/login.defs
Ludwig Nussel [Mon, 9 Aug 2010 14:03:12 +0000 (16:03 +0200)] 
honor settings in /etc/default/su resp /etc/login.defs

13 years agoset sane default path
Ludwig Nussel [Mon, 9 Aug 2010 14:02:30 +0000 (16:02 +0200)] 
set sane default path

13 years agolog all su attempts
Ludwig Nussel [Tue, 17 Aug 2010 11:22:01 +0000 (13:22 +0200)] 
log all su attempts

13 years agopam support for su
Ludwig Nussel [Tue, 17 Aug 2010 11:21:44 +0000 (13:21 +0200)] 
pam support for su

13 years agomerge coreutils' last GPL2 version of su.c
Ludwig Nussel [Thu, 24 May 2012 11:50:10 +0000 (13:50 +0200)] 
merge coreutils' last GPL2 version of su.c

13 years agotests: add UFS uuids to results
Karel Zak [Thu, 24 May 2012 11:33:38 +0000 (13:33 +0200)] 
tests: add UFS uuids to results

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofdisk: don't print welcome message to stderr
Karel Zak [Wed, 23 May 2012 09:26:42 +0000 (11:26 +0200)] 
fdisk: don't print welcome message to stderr

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofdisk: add readonly option to fdisk_new_context_from_filename()
Karel Zak [Wed, 23 May 2012 09:24:04 +0000 (11:24 +0200)] 
fdisk: add readonly option to fdisk_new_context_from_filename()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofdisk: always use stderr for debug messages
Karel Zak [Wed, 23 May 2012 09:09:49 +0000 (11:09 +0200)] 
fdisk: always use stderr for debug messages

 * add dbgprint() to provide standardized debug output

 * print initial debug message to stderr

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: use stderr for initial debug message
Karel Zak [Wed, 23 May 2012 09:05:37 +0000 (11:05 +0200)] 
libmount: use stderr for initial debug message

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofdisk: add debug support
Davidlohr Bueso [Mon, 21 May 2012 20:32:25 +0000 (22:32 +0200)] 
fdisk: add debug support

Based on libmnt, this patch adds basic debugging support for fdisk. Currently
only CONTEXT is debugged, yet keeps exact functionality as libmnt/libblkid.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: introduce fdisk context
Davidlohr Bueso [Mon, 21 May 2012 20:28:03 +0000 (22:28 +0200)] 
fdisk: introduce fdisk context

This is the first patch that adds the initial parts of the new fdisk internal
API. Two functions are created to both init and deinit the fdisk context. Only
the device's descriptor and path are added as a start and these are replaced
throughout fdisk.c and label specific code.

All logic that opens the file does it with fdisk_new_context_from_filename(),
and this enforces always opening the device with rw, then, if unsuccesfull,
with read-only. This changes the current logic that opens the device with
certain permissions depending on the user given options.  For example, -l opens
the device read-only.

This patch passed regression tests and local modifications for sgi/dos/sun disk
labels.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: refactor -s option
Davidlohr Bueso [Mon, 21 May 2012 19:23:27 +0000 (21:23 +0200)] 
fdisk: refactor -s option

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: use BSD label header
Davidlohr Bueso [Sun, 20 May 2012 16:11:33 +0000 (18:11 +0200)] 
fdisk: use BSD label header

Move bsd specific function definitions into its own header file and include it in fdisk code.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: remove bogus statement
Davidlohr Bueso [Sun, 20 May 2012 16:11:26 +0000 (18:11 +0200)] 
fdisk: remove bogus statement

usage() does not return, also move the help option handling to the bottom of the switch.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: add an quit/exit handling function
Davidlohr Bueso [Sun, 20 May 2012 16:11:21 +0000 (18:11 +0200)] 
fdisk: add an quit/exit handling function

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agomisc-utils: cleanup unused strings.h includes
maximilian attems [Tue, 22 May 2012 14:33:23 +0000 (16:33 +0200)] 
misc-utils: cleanup unused strings.h includes

Noticed on klibc building.

Signed-off-by: maximilian attems <max@stro.at>
13 years agoinclude: [c.h] protect container_of
maximilian attems [Tue, 22 May 2012 14:20:42 +0000 (16:20 +0200)] 
include: [c.h] protect container_of

fixes lots of warning noise:
../../../include/c.h:112:0: warning: "container_of" redefined [enabled
by default]
/usr/lib/klibc/include/stddef.h:52:0: note: this is the location of the
previous definition

Signed-off-by: maximilian attems <max@stro.at>
13 years agohexdump: fix comparison of distinct pointer types
Karel Zak [Wed, 23 May 2012 08:20:19 +0000 (10:20 +0200)] 
hexdump: fix comparison of distinct pointer types

display.c: In function ‘get’:
display.c:262:117: warning: comparison of distinct pointer types lacks
a cast [enabled by default]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolast: use min() from c.h
Karel Zak [Wed, 23 May 2012 08:07:57 +0000 (10:07 +0200)] 
last: use min() from c.h

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: Use binary search to compare pseudofs
Dave Reisner [Sun, 20 May 2012 16:57:27 +0000 (12:57 -0400)] 
libmount: Use binary search to compare pseudofs

It's the responsibility of anyone adding to this list in the future to
ensure that the list remains sorted.

While we're at it, expand this list of known pseudofs types.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agofindmnt: fallback to mountinfo for polling
Dave Reisner [Sun, 20 May 2012 00:39:20 +0000 (20:39 -0400)] 
findmnt: fallback to mountinfo for polling

If no tabfiles are specified, default to watching /proc/self/mountinfo
rather than exiting silently with EXIT_FAILURE.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agofindmnt: reference correct manual section
Dave Reisner [Sun, 20 May 2012 00:39:19 +0000 (20:39 -0400)] 
findmnt: reference correct manual section

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agolibuuid: use max() from c.h
Petr Uzel [Thu, 17 May 2012 07:41:09 +0000 (09:41 +0200)] 
libuuid: use max() from c.h

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agotext-utils: use min() from c.h
Petr Uzel [Thu, 17 May 2012 07:41:08 +0000 (09:41 +0200)] 
text-utils: use min() from c.h

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agomkfs.cramfs: remove unused 'MIN' macro definition
Petr Uzel [Thu, 17 May 2012 07:41:07 +0000 (09:41 +0200)] 
mkfs.cramfs: remove unused 'MIN' macro definition

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agoblkid: stop device probing if error is detected
Petr Uzel [Thu, 17 May 2012 07:37:25 +0000 (09:37 +0200)] 
blkid: stop device probing if error is detected

blkid -p dev1 dev2 [...] now stops upon first error detected and
returns correct value. Previously, if error was detected with dev1,
it continued with dev2 anyways and so the return value corresponded
to the last device only.

Reported-by: Bernhard Voelker <bernhard.voelker@siemens-enterprise.com>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agoblkid: introduce symbolic names for different blkid exit codes
Petr Uzel [Wed, 16 May 2012 08:38:32 +0000 (10:38 +0200)] 
blkid: introduce symbolic names for different blkid exit codes

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agoblkid: use symbolic exit code
Petr Uzel [Wed, 16 May 2012 08:38:31 +0000 (10:38 +0200)] 
blkid: use symbolic exit code

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agoMerge branch 'master' of https://github.com/jhuntwork/util-linux
Karel Zak [Wed, 23 May 2012 07:39:40 +0000 (09:39 +0200)] 
Merge branch 'master' of https://github.com/jhuntwork/util-linux

13 years agowdctl: add --oneline
Karel Zak [Tue, 22 May 2012 11:31:46 +0000 (13:31 +0200)] 
wdctl: add --oneline

 * remove --pairs, it was usable for flags table only

 * one line for each watchdog device

For example:

 # wdctl --noident --noflags --oneline
 /dev/watchdog: TIMEOUT="30" TIMELEFT="2"

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib/tt: export tt_fputs_{quoted,nonblank} function
Karel Zak [Tue, 22 May 2012 11:27:46 +0000 (13:27 +0200)] 
lib/tt: export tt_fputs_{quoted,nonblank} function

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agowdctl: allow to specify more than one device
Karel Zak [Tue, 22 May 2012 09:39:26 +0000 (11:39 +0200)] 
wdctl: allow to specify more than one device

 * remove -d <device> option

 * support wdctl [options] [<device> ...] usage

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: fix segmentation fault in log_utmp
Karel Zak [Mon, 21 May 2012 07:58:42 +0000 (09:58 +0200)] 
login: fix segmentation fault in log_utmp

 ctx->tty_number is optional...

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=822705
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agowdctl: add --flags-only and optional column DEVICE
Karel Zak [Fri, 18 May 2012 13:08:31 +0000 (15:08 +0200)] 
wdctl: add --flags-only and optional column DEVICE

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoeject: allow to address device by LABEL/UUID
Karel Zak [Fri, 18 May 2012 10:01:10 +0000 (12:01 +0200)] 
eject: allow to address device by LABEL/UUID

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: don't canonicalize target
Karel Zak [Thu, 17 May 2012 10:10:43 +0000 (12:10 +0200)] 
libmount: don't canonicalize target

Note that mountpoint (target_ paths in /proc/mounts and /proc/self/mountinfo
are always canonicalized by kernel.

 * for umount we don't have to canonicalize target
   by default if the mountpoint is found in /proc/self/mountinfo

 * in mnt_table_find_target() is unnecessary to canonicalize target paths
   if the table of the filesystems is read from /proc/self/mountinfo

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=820707
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotext-utils: cleanup strtoxx_or_err()
Karel Zak [Tue, 15 May 2012 15:46:20 +0000 (17:46 +0200)] 
text-utils: cleanup strtoxx_or_err()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoterm-utils: cleanup strtoxx_or_err()
Karel Zak [Tue, 15 May 2012 15:46:05 +0000 (17:46 +0200)] 
term-utils: cleanup strtoxx_or_err()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agosys-utils: cleanup strtoxx_or_err()
Karel Zak [Tue, 15 May 2012 15:45:17 +0000 (17:45 +0200)] 
sys-utils: cleanup strtoxx_or_err()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoschedutils: cleanup strtoxx_or_err()
Karel Zak [Tue, 15 May 2012 15:45:05 +0000 (17:45 +0200)] 
schedutils: cleanup strtoxx_or_err()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopartx: cleanup strtoxx_or_err()
Karel Zak [Tue, 15 May 2012 15:44:51 +0000 (17:44 +0200)] 
partx: cleanup strtoxx_or_err()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomisc-utils: cleanup strtoxx_or_err()
Karel Zak [Tue, 15 May 2012 15:44:37 +0000 (17:44 +0200)] 
misc-utils: cleanup strtoxx_or_err()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agosulogin: cleanup strtoxx_or_err()
Karel Zak [Tue, 15 May 2012 15:44:19 +0000 (17:44 +0200)] 
sulogin: cleanup strtoxx_or_err()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agohwclock: cleanup strtoxx_or_err()
Karel Zak [Tue, 15 May 2012 15:44:02 +0000 (17:44 +0200)] 
hwclock: cleanup strtoxx_or_err()

Signed-off-by: Karel Zak <kzak@redhat.com>