coding style: add defined types to .indent.pro

Make indent to understand what types are defined. That will make for
example 'FILE * fd' to be 'FILE *fd'.  With this the indent will also
keep spacing of address operator, that is '&fd', correct.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
coding style: use symbolic exit values consistently

After this commit "git grep -E '(return|exit).*EXIT'" will find every
occurrence where probram execution will end.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Fix some issues introduced in
c58b1d9 Documentation improvements based on Michael Lass suggestions.

* give -m an own line in manpage
* don't explain -P twice
* correct description of -P to what it actually does

Signed-off-by: Marcela Mašláňová <mmaslano@redhat.com>
Fix missing includes for selinux and other types.
Drop duplicate -lselinux -laudit.
Condtionalize pam functions.
New release 1.4.10.
crontab: make usage easier to read

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
crond: make usage easier to read

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
compliancy: use sysconf() to determine max hostname length

Earlier use of MAXHOSTNAMELEN is not posix compliant, though it usually
results to be correct value.  Using sysconf() is more correct, and avoids
rather nasty gethostname() catch.  If a hostname length is exactly the
maximum a character buffer which has lenght of MAXHOSTNAMELEN will not be
null terminated.  That will leave the later string operations vulnerable
to buffer overflow.

Reference: http://refspecs.linuxfoundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic.html#BASELIB-SETHOSTNAME-2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
smatch scan: fix various warningss found using smatch

entry.c:396 load_entry() info: redundant null check on e->pwd calling free()
entry.c:398 load_entry() info: redundant null check on e->cmd calling free()

/usr/include/bits/fcntl.h:48:10: warning: preprocessor token O_NOFOLLOW redefined
macros.h:136:9: this was the original definition

security.c:98:44: warning: non-ANSI function declaration of function 'cron_restore_default_security_context'
crontab.c:439:29: warning: non-ANSI function declaration of function 'tmp_path'

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
compile: fix signed and unsigned warnings

cron.c:100:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
cron.c:108:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
cron.c:125:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
compile: add function attributes

Some of the argument values are not in use, and few functions does not
return.  Informing which will make few warning messages disapper, and
compiler to generate better binary.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
anacron: add function attributes

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
anacron: fix shadow declarations

Similar issue as below time after time in various functions.

log.c:74:35: warning: declaration of 'args' shadows a global declaration [-Wshadow]
global.h:97:15: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
anacron: remove unnecessary casts, and redundant assigment

readtab.c:288:54: warning: cast from function call of type 'int' to non-matching type 'double' [-Wbad-function-cast]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
anacron: set end job message string to be constant

runjob.c:308:7: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
anacron: clean up usage() output

Inform in usage which options will need arguments, and add reference to
manual page.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
anacron: remove numeric exit and file descriptor values

Use symbolic values from standard header instead.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
common: move xgethostname to cronie_common.h

The function is needed by both cron and anacron.

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