glibc/login
Florian Weimer d4625a19fe 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
2019-11-12 20:13:35 +01:00
..
programs Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
endutxent.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
forkpty.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getlogin_r_chk.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getlogin_r.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getlogin.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getpt.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getutent_r.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getutent.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getutid_r.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getutid.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getutline_r.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getutline.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getutmp.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getutmpx.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getutxent.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getutxid.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getutxline.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
grantpt.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
lastlog.h
login_tty.c Convert 703 function definitions to prototype style. 2015-10-16 20:21:49 +00:00
login.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
logout.c Change most internal uses of __gettimeofday to __clock_gettime. 2019-10-30 17:04:10 -03:00
logwtmp.c Change most internal uses of __gettimeofday to __clock_gettime. 2019-10-30 17:04:10 -03:00
Makefile login: Acquire write lock early in pututline [BZ #24882] 2019-11-07 23:09:39 +01:00
openpty.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ptsname_r_chk.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ptsname.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
pty.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
pututxline.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
setlogin.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
setutxent.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-getlogin.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-grantpt.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-ptsname.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-pututxline-cache.c login: Acquire write lock early in pututline [BZ #24882] 2019-11-07 23:09:39 +01:00
tst-pututxline-lockfail.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-updwtmpx.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-utmp.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-utmpx.c
unlockpt.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
updwtmp.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
updwtmpx.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
utmp_file.c login: Use pread64 in utmp implementation 2019-11-12 20:13:35 +01:00
utmp-private.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
utmp.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
utmpname.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
utmpxname.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
Versions Move getlogin_r_chk to login/ subdir. 2013-05-06 15:58:44 -07:00