diff options
author | Florian Weimer <fweimer@redhat.com> | 2019-11-12 12:25:49 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2019-11-12 20:13:35 +0100 |
commit | d4625a19fe64f664119a541b317fb83de01bb273 (patch) | |
tree | fc3fd0f7848e246b024551e1bd339b2dab9e9a98 /io/openat64.c | |
parent | ca136bb0a36d0a7056c926bfe5126873566efe40 (diff) | |
download | glibc-d4625a19fe64f664119a541b317fb83de01bb273.tar.gz glibc-d4625a19fe64f664119a541b317fb83de01bb273.tar.xz glibc-d4625a19fe64f664119a541b317fb83de01bb273.zip |
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
Diffstat (limited to 'io/openat64.c')
0 files changed, 0 insertions, 0 deletions