util-linux/login-utils
Ruediger Meier 2e81d99870 last, fix race when comparing time stamps
It is just luck if two time() calls happen within the same
second. Introduced in 31d28e09.

Actually I don't like adding another global variable but this
way we avoid bigger refactoring. IMO it's questionable why
lastdate, lastdown, etc. are initialized with current time() at
all. It looks unsafe to print "still running" always when
logout_time = now.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-03-25 10:36:52 +01:00
..
Makemodule.am build-sys: cleanup realtime lib usage 2015-03-06 14:20:19 +01:00
auth.c login-utils: Enable building util-linux against OpenPAM 2014-12-15 10:16:03 +01:00
auth.h chsh-chfn: Move pam auth to its own function, factoring out common code 2013-02-13 09:28:33 +01:00
ch-common.c chfn, chsh: share illegal_passwd_chars() function 2015-01-05 22:52:50 +00:00
ch-common.h chfn, chsh: share illegal_passwd_chars() function 2015-01-05 22:52:50 +00:00
chfn.1 docs: restore minus symbols in long opts 2015-01-20 18:15:30 -05:00
chfn.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
chsh.1 docs: restore minus symbols in long opts 2015-01-20 18:15:30 -05:00
chsh.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
islocal.c login-utils: use libc error printing facility 2014-12-09 09:19:20 +01:00
islocal.h login: rewrite is_local() to remove limits on line length 2008-04-14 13:12:14 +02:00
last-deprecated.1 last: merge sysvinit last/lastb 2013-08-12 12:07:52 +02:00
last-deprecated.c last: merge sysvinit last/lastb 2013-08-12 12:07:52 +02:00
last.1 docs: fix some spelling errors and typos in man pages 2015-02-27 14:48:56 +01:00
last.c last, fix race when comparing time stamps 2015-03-25 10:36:52 +01:00
lastb.1 last: merge sysvinit last/lastb 2013-08-12 12:07:52 +02:00
libuser.c chsh-chfn: fix bugs, improve compilation 2013-02-13 13:44:34 +01:00
libuser.h chsh: Add libuser support 2013-02-13 09:37:15 +01:00
login.1 login: fix minor typos in the man page 2014-04-07 12:38:17 +02:00
login.c login: fix mem leak in init_environ() [coverity scan] 2015-01-29 11:25:07 +01:00
logindefs.c lslogins: add functionality 2014-05-15 13:55:59 +02:00
logindefs.h lslogins: add functionality 2014-05-15 13:55:59 +02:00
lslogins.1 docs: fix some spelling errors and typos in man pages 2015-02-27 14:48:56 +01:00
lslogins.c maint: fix shadow declaration 2015-01-07 10:08:21 +01:00
newgrp.1 docs: uniformize the header and footer lines in man pages 2011-08-22 10:39:21 +02:00
newgrp.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
nologin.8 docs: remove obsolete and unneeded comments from man-page files 2015-01-12 11:03:26 +01:00
nologin.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
runuser.1 docs: fix some spelling errors and typos in man pages 2015-02-27 14:48:56 +01:00
runuser.c su: fix stupid typo 2012-11-01 13:03:28 +01:00
selinux_utils.c selinux_utils: fix coding style 2011-11-29 17:58:00 +01:00
selinux_utils.h Imported from util-linux-2.12a tarball. 2006-12-07 00:26:14 +01:00
setpwnam.c textual: fix two misencodings in comments 2013-02-06 11:15:05 +01:00
setpwnam.h pathnames: clean up various user database paths 2012-03-18 14:28:05 +01:00
su-common.c su: fix mem leak in modify_environ() [coverity scan] 2015-01-29 11:26:09 +01:00
su-common.h su: move generic su code to su-common.c 2012-09-04 17:00:30 +02:00
su.1 docs: restore minus symbols in long opts 2015-01-20 18:15:30 -05:00
su.c su: fix stupid typo 2012-11-01 13:03:28 +01:00
sulogin-consoles.c sulogin: make sure that fallback FD is valid [coverity scan] 2015-01-29 11:32:42 +01:00
sulogin-consoles.h include/ttyutils: add default chardata 2013-01-08 15:42:12 +01:00
sulogin.8 docs: improve the formatting and wording of two man pages 2014-07-17 14:00:50 +02:00
sulogin.c sulogin, hwclock: use xusleep() instead of usleep() 2015-02-10 13:21:24 +01:00
utmpdump.1 docs: give the man page of utmpdump the proper User Commands header 2014-07-29 12:14:58 +02:00
utmpdump.c textual: grammarize and harmonize the stat error message 2015-02-02 11:27:10 +01:00
vigr.8 Imported from util-linux-2.7.1 tarball. 2006-12-07 00:25:34 +01:00
vipw.8 docs: fix-up man-pages flaged by checkmans.sh 2015-01-13 11:43:46 -05:00
vipw.c rpmatch: use symbolic value when evaluation return codes 2015-02-24 12:42:06 +01:00