Commit Graph

8 Commits

Author SHA1 Message Date
Sami Kerola c9baf5da86 logindefs: change getlogindefs_num() to return unsigned long
Where ever getlogindefs_num() is called return value is always
expected to be unsigned, such as sleep() input, gid_t or mode_t.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-02 11:57:42 +02:00
Ludwig Nussel 9c44ac503f 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.
2012-05-25 10:55:40 +02:00
Sami Kerola 439cdf1e24 login-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-04 19:58:34 +02:00
Karel Zak a807750932 login: minor spelling fixes
Reported-by: Elan Ruusamäe <glen@delfi.ee>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-06 11:38:51 +01:00
Elan Ruusamäe 466a826729 login: minor spelling fixes
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-06 11:32:37 +01:00
Karel Zak 607e6b7ce8 login: support crazy shadow-utils syntax in login.defs
standard syntax for FOO=data:

	ENV_FOO   data

additional syntax:

	ENV_FOO  FOO=data

Reported-by: Colin Guthrie colin@mageia.org
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-28 11:16:16 +01:00
Sami Kerola 3f9c237dcb logindefs: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Karel Zak c82d9c977c login: add login.defs code and tests
The new logindefs.c file contains /etc/login.defs parser and functions
for searching in the list of the login default variables. The patch
also contains a new regression test for the code.

Based on pam_login-4.0 from Suse.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:17 +02:00