summaryrefslogtreecommitdiffstats
path: root/login-utils/logindefs.c
Commit message (Collapse)AuthorAgeFilesLines
* misc: consolidate version printing and close_stdout()Karel Zak2019-04-161-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* login-utils/logindefs: clenaup APIKarel Zak2019-01-111-1/+1
| | | | | | The default value should be unsigned if the result is also unsigned... Signed-off-by: Karel Zak <kzak@redhat.com>
* su: add control structKarel Zak2017-09-181-3/+10
| | | | | | | | * setup logindefs loader by function rather than by global pointer * move basic booleans to the su_context struct Signed-off-by: Karel Zak <kzak@redhat.com>
* login: prevent OOB read on illegal /etc/hushloginsTobias Stoeckmann2017-03-131-1/+2
| | | | | | | | | If the file /etc/hushlogins exists and a line starts with '\0', the login tools are prone to an off-by-one read. I see no reliability issue with this, as it would clearly need a hostile action from a system administrator. But for the sake of correctness, I've sent this patch nonetheless.
* lslogins: add functionalityOndrej Oprala2014-05-151-4/+14
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* login: extract get_hushlogin_statusOndrej Oprala2014-05-151-0/+122
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* su: fix compiler warning [-Wstrict-prototypes]Karel Zak2012-09-211-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* logindefs: change getlogindefs_num() to return unsigned longSami Kerola2012-06-021-3/+3
| | | | | | | 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>
* use existing logindefs.c and pathnames.hLudwig Nussel2012-05-251-3/+13
| | | | | | 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.
* login-utils: verify writing to streams was successfulSami Kerola2012-04-041-0/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* login: minor spelling fixesKarel Zak2012-03-061-1/+1
| | | | | Reported-by: Elan Ruusamäe <glen@delfi.ee> Signed-off-by: Karel Zak <kzak@redhat.com>
* login: minor spelling fixesElan Ruusamäe2012-03-061-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* login: support crazy shadow-utils syntax in login.defsKarel Zak2012-02-281-0/+37
| | | | | | | | | | | | | 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>
* logindefs: fix coding styleSami Kerola2011-11-291-20/+22
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* login: add login.defs code and testsKarel Zak2011-10-261-0/+246
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>