glibc/login
Florian Weimer 858069cb60 login: Use pread64 in utmp implementation
This reduces the possible error scenarios considerably because
no longer can file seek fail, leaving the file descriptor in an
inconsistent state and out of sync with the cache.

As a result, it is possible to avoid setting file_offset to -1
to make an error persistent.  Instead, subsequent calls will retry
the operation and report any errors returned by the kernel.

This change also avoids reading the file from the start if pututline
is called multiple times, to work around lock acquisition failures
due to timeouts.

Change-Id: If21ea0c162c38830a89331ea93cddec14c0974de
(cherry picked from commit d4625a19fe)
2020-01-17 13:56:43 +01:00
..
programs login: Assume that _HAVE_UT_* constants are true 2020-01-17 13:54:11 +01:00
endutxent.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
forkpty.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getlogin_r_chk.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getlogin_r.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getlogin.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getpt.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getutent_r.c login: Remove utmp backend jump tables [BZ #23518] 2020-01-17 13:54:07 +01:00
getutent.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getutid_r.c login: Assume that _HAVE_UT_* constants are true 2020-01-17 13:54:11 +01:00
getutid.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getutline_r.c login: Remove utmp backend jump tables [BZ #23518] 2020-01-17 13:54:07 +01:00
getutline.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getutmp.c login: Assume that _HAVE_UT_* constants are true 2020-01-17 13:54:11 +01:00
getutmpx.c login: Assume that _HAVE_UT_* constants are true 2020-01-17 13:54:11 +01:00
getutxent.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getutxid.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getutxline.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
grantpt.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
lastlog.h Update. 1997-06-21 02:59:26 +00:00
login_tty.c Convert 703 function definitions to prototype style. 2015-10-16 20:21:49 +00:00
login.c login: Assume that _HAVE_UT_* constants are true 2020-01-17 13:54:11 +01:00
logout.c login: Assume that _HAVE_UT_* constants are true 2020-01-17 13:54:11 +01:00
logwtmp.c login: Assume that _HAVE_UT_* constants are true 2020-01-17 13:54:11 +01:00
Makefile login: Acquire write lock early in pututline [BZ #24882] 2020-01-17 13:56:29 +01:00
openpty.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ptsname_r_chk.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ptsname.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
pty.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
pututxline.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
setlogin.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
setutxent.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-getlogin.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-grantpt.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-ptsname.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-pututxline-cache.c login: Acquire write lock early in pututline [BZ #24882] 2020-01-17 13:56:29 +01:00
tst-pututxline-lockfail.c login: pututxline could fail to overwrite existing entries [BZ #24902] 2020-01-17 13:55:35 +01:00
tst-updwtmpx.c login: Fix updwtmp, updwtmx unlocking 2020-01-17 13:54:11 +01:00
tst-utmp.c login: Assume that _HAVE_UT_* constants are true 2020-01-17 13:54:11 +01:00
tst-utmpx.c Update. 1998-06-02 12:58:14 +00:00
unlockpt.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
updwtmp.c login: Remove utmp backend jump tables [BZ #23518] 2020-01-17 13:54:07 +01:00
updwtmpx.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
utmp_file.c login: Use pread64 in utmp implementation 2020-01-17 13:56:43 +01:00
utmp-private.h login: Remove utmp backend jump tables [BZ #23518] 2020-01-17 13:54:07 +01:00
utmp.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
utmpname.c login: Remove utmp backend jump tables [BZ #23518] 2020-01-17 13:54:07 +01:00
utmpxname.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
Versions Move getlogin_r_chk to login/ subdir. 2013-05-06 15:58:44 -07:00