Commit Graph

5507 Commits

Author SHA1 Message Date
Karel Zak 2b945eda3d agetty: add \4 and \6 issue file sequences to print IP addresses
Based on Andrea Bonomi <a.bonomi@endian.com> ideas.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-13 12:59:46 +02:00
Karel Zak df0bd828b1 build-sys: simplify usrlib_execdir initialization
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-12 18:09:28 +02:00
Karel Zak 10a42fb776 build-sys: fix --localstatedir heuristics
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-12 16:36:06 +02:00
Karel Zak 9d57f184cf tests: remove encryption loopdev test
Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-12 14:49:49 +02:00
Karel Zak 4be900c51d libmount: don't remove user= when executed by root
The original mount(8) allows to store arbitrary user= option to mtab
file if called by root user. For example:

  # mount -f foo /bar -t xxx -o rw,user=kzak

the new mount removes the 'user=' and 'users' options at all for root
user. This is regression. The original functionality is necessary by
'sshfs' where fuse writes to mtab file by mount(8).

Reported-by: Juergen Daubert <jue@jue.li> (and 'horrorStruck' on IRC)
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-12 14:27:12 +02:00
Karel Zak 3de77c2173 libmount: segfaults if neither /etc/filesystems nor/proc/filesystems exists
Reported-by: Juergen Daubert <jue@jue.li>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-12 11:57:19 +02:00
Ludwig Nussel 5cf05c7147 mount: losetup: remove obsolete encryption support
kernel cryptoloop is deprecated since ages and support for cryptoloop
in util-linux is incomplete/broken.
- no password hashing
- last 8 bit of key are always set to zero
- no binary keys possible (stops reading key at \n and \0)

In the past some Distros added the above features with patches. So
remove cryptoloop support from util-linux completely to make sure
people won't try using it.

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-11 10:46:11 +02:00
Karel Zak af2e97b56b build-sys: remove static from config-gen.d/{devel,all}.conf
It's impossible to compile static when gcc/ld is forced to
use GNU_RELRO and BIND_NOW for suid binaries (e.g. mount).

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-11 10:25:55 +02:00
Karel Zak 0391552429 libblkid: fix copyright noticed to be consistent (so all are LGPL)
The libblkid library was intended to be released under the LGPL.
There is very little significant code in version.c; just a version
parser, and the original copyright holder (Theodore Ts'o,
tytso@mit.edu) has confirmed that he had intended to relicense all of
the files under the LGPL during a time when he was the sole author.

Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: John Calcote <john.calcote@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-11 09:30:16 +02:00
Ondrej Oprala 83765871ef hwclock: add a new --compare option
The new option imitates adjtimex -c functionality and outputs
the drift in 10 second intervals.

[kzak@redhat.com: - coding style
                  - print hw and system time columns too]

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-10 16:00:27 +02:00
Karel Zak 6cd3e35c77 Merge https://github.com/hramrach/util-linux 2012-09-10 11:17:53 +02:00
Karel Zak c667aff93f libmount: improve mnt_table_get_root_fs() docs
Fix info about return value, improve description.

Reported-by: Amit <amit.uttam@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-10 10:30:11 +02:00
Karel Zak 2eb5ba0bd4 wdctl: add fallbacks for old kernel headers
Reported-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 18:08:55 +02:00
Karel Zak 7fcccbdfbe build-sys: add --disable-wdctl
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 14:19:17 +02:00
Karel Zak 92fe6e9633 eject: robust strings usage [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 13:43:56 +02:00
Karel Zak 63beec6443 whereis: improve readability for analysers
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 13:43:49 +02:00
Karel Zak 9d48340d44 lib/pager: robust work with file descriptors [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 13:29:55 +02:00
Karel Zak 7a84c0393a sulogin: cleanup file descriptors usage
- use _FILENO macros rather than magic numbers
 - check for dup() result

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 13:18:22 +02:00
Karel Zak 17df84df27 switch_root: check open() return value [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 13:02:42 +02:00
Michal Suchanek 3b4f1aeecc Fix configure to work with multiarch distributions. 2012-09-07 12:58:37 +02:00
Karel Zak fee9431f97 lib/sysfs: more robust sysfs_opendir() [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 12:15:39 +02:00
Karel Zak 67757329cc mark expected fallthrough for static analysers
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 12:05:56 +02:00
Karel Zak a291c7ff51 tunelp: add missing break [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 12:00:53 +02:00
Karel Zak f7fff0096a getopt: make the code more readable for analysers
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 11:42:34 +02:00
Karel Zak 38efd1e2b7 namei: remove dead code [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 11:39:38 +02:00
Karel Zak ceaff03b27 libblkid: check fchmod() return value [coverity scan] 2012-09-07 11:01:07 +02:00
Karel Zak c1028673fe libblkid: improve DBG() macro
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 10:58:49 +02:00
Karel Zak 1a1c0ad77c docs: add note about /etc/pam.d/su-l to ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-05 14:06:28 +02:00
Björn Jacke 309f26bb5f mount: fix man pahe typo in quota mount option names 2012-09-05 13:56:16 +02:00
Karel Zak bda67d64de su: move long options to main()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-05 11:26:20 +02:00
Karel Zak 4e1834978f su: verify writing to streams was successful
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-05 11:21:07 +02:00
Karel Zak d10028a712 su: more robust getpwuid() for GNU Hurt [coreutils 71b7ddc]
Let's support GNU Hurd over-engineering where a process can exist
without UID and getuid() returns -1 and sets errno.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-05 11:13:34 +02:00
Dave Reisner 6edbca18bb build-sys: install su.1 if building su
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-09-05 10:45:46 +02:00
Benno Schulenberg b8ccc27c1b wdctl: treat aligned translatable strings in a uniform manner
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2012-09-04 17:28:19 +02:00
Benno Schulenberg 19c19b637d wdctl: gettextize one forgotten word
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2012-09-04 17:28:16 +02:00
Benno Schulenberg e9e7698eb4 textual: add missing comma and colon in some help texts
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2012-09-04 17:27:50 +02:00
Yuri Chornoivan bbac757b1e textual: fix typos in messages 2012-09-04 17:26:31 +02:00
Davidlohr Bueso ca3dbca10b libmount: document LIBMOUNT_DEBUG users
Update the manpages of programs that use this environment variable for
extra debugging information.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2012-09-04 17:21:57 +02:00
Davidlohr Bueso ddfeda98d8 blkid: document LIBBLKID_DEBUG users
Update the manpages of programs that use this environment variable for
extra debugging information.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2012-09-04 17:21:54 +02:00
Milan Broz 12b06c3dfc lsblk: add add_random columns
Allow printing of queue/add_random attribute which describes
if device adds randomness to kernel RNG pool.

Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-09-04 17:21:53 +02:00
Karel Zak 4f2c0b2d03 runuser: add note about PAM to man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 17:00:31 +02:00
Karel Zak 21d7483eb4 docs: add list of expected PAM config files
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 17:00:31 +02:00
Karel Zak 7ec6adb1cc runuser: new command (derived from su(1))
This command is based on su(1), the differences:

 - based on Fedora runuser su(1) patch
 - not installed with suid rights
 - allowed for root users only
 - don't ask for password
 - uses PAM session, for example:

$ cat /etc/pam.d/runuser
auth		sufficient	pam_rootok.so
session		optional	pam_keyinit.so revoke
session		required	pam_limits.so
session		required	pam_unix.so

$ cat /etc/pam.d/runuser-l
auth		include		runuser
session		optional	pam_keyinit.so force revoke
session		include		runuser

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 17:00:31 +02:00
Karel Zak cf1a99dacc su: move generic su code to su-common.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 17:00:30 +02:00
Karel Zak 8528ea2f81 su: add --group and --supp-group options
These options allow to specify alternative groups. The command
su(1) has to be executed by root. The implementation is based on
Fedora runuser(1) command.

For example:

 # su --group=kzak --supp-group=uuidd -
 # id
 uid=0(root) gid=1000(kzak) groups=0(root),985(uuidd),1000(kzak)

non-root user:

 $ su --group=kzak -
 su: only root can specify alternative groups

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 17:00:30 +02:00
Karel Zak 4e1073c23b build-sys: add configure summary
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 16:49:28 +02:00
Karel Zak 0825179f47 col: fix compiler warning [-Wstrict-prototypes]
text-utils/col.c:142:43: warning: function declaration isn’t a prototype [-Wstrict-prototypes]

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 16:49:28 +02:00
Karel Zak aa71999827 fsck.cramfs: fix compiler warning [-Wpointer-arith]
disk-utils/fsck.cramfs.c: In function ‘test_crc’:
disk-utils/fsck.cramfs.c:231:32: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
disk-utils/fsck.cramfs.c:233:24: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 16:49:28 +02:00
Karel Zak dcd33c3e15 build-sys: add another compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 16:49:28 +02:00
Karel Zak d39c2b438f libmount: use O_CLOEXEC everywhere
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 16:49:28 +02:00