tests: apply travis clang PATH workaround

As seen in Travis build log the clang is not found, causing one of the
tests to fail.  This change adds a workaround from Travis issue 2607 to
util-linux.

Reference: https://travis-ci.org/karelzak/util-linux/jobs/33056101#L3630
Reference: https://github.com/travis-ci/travis-ci/issues/2607
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libmount: use -t for type.subtype in helpers API

References: https://github.com/karelzak/util-linux/issues/116
Signed-off-by: Karel Zak <kzak@redhat.com>
mountpoint: drop S_ISDIR check

Files can be mountpoints, too.
cal: add const function attributes

Reference: http://lwn.net/Articles/285332/
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
cal: prefer defined constant rather than magic values

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libuuid: add extern qualifiers to system header

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
include: simplify fputc_careful() in carefulputc.h

New version of comparisions does the same thing as the old version
without being quite as difficult to understand.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
lib: avoid use of obsolete getpass() function

Reference: http://man7.org/linux/man-pages/man3/getpass.3.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
lib: add function to remove string from memory

The memcpy(3) can be get optimized out by compiler.

Reference: https://www.securecoding.cert.org/confluence/display/seccode/MSC06-C.+Beware+of+compiler+optimizations
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
newgrp: use xgetpass() and memset_s() to group password validation

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
last: make is_phantom() when kernel config does not include audit support

When kernel CONFIG_AUDIT is not set the /proc/<pid>/loginuid information
is not present resulting live sessions to be marked 'gone - no logout' in
last(1) print out.  To go-around this change makes last(1) to look
/dev/<tty> device ownership as a substitute of loginuid.

The go-around seems to work fairly well, but it has it short comings.
For example after closing a X window session the /dev/ttyN file seems to
be owned by root, not the user who had it before entering to the X
session.  While that is suboptimal it is still better than an attmempt to
determine uid_t by looking owner of the /proc/<struct utmp ut_pid>, that
is a login(1) process running as root.

The issue was found using Archlinux installation.

$ pacman -Qi linux
Name           : linux
Version        : 3.16-2
[...]
Build Date     : Mon Aug 4 18:06:51 2014

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
last: improve code readability by renaming variable names

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
zramctl: fix two format string warnings

Both warnings were similar.

sys-utils/zramctl.c:527:23: warning: format string is not a string
literal (potentially insecure) [-Wformat-security]
                                err(EXIT_FAILURE, zram->devname);

Signed-off-by: Sami Kerola <kerolasa@iki.fi>