From: Florian Weimer <fweimer@redhat.com>
To: libc-stable@sourceware.org
Subject: [2.30 COMMITTED] login: Use struct flock64 in utmp [BZ #24880]
Date: Wed, 01 Jan 2020 00:00:00 -0000 [thread overview]
Message-ID: <20200117140432.46B898299EE2@oldenburg2.str.redhat.com> (raw)
Commit 06ab719d30b01da401150068054d3b8ea93dd12f ("Fix Linux fcntl OFD
locks for non-LFS architectures (BZ#20251)") introduced the use of
fcntl64 into the utmp implementation. However, the lock file
structure was not updated to struct flock64 at that point.
(cherry picked from commit 0d5b2917530ccaf8ad312dfbb7bce69d569c23ad)
2019-08-15 Florian Weimer <fweimer@redhat.com>
[BZ #24880]
* login/utmp_file.c (file_locking_failed): Use struct flock64.
(file_locking_unlock): Likewise.
diff --git a/NEWS b/NEWS
index 96458cf0b9..8952a8a77d 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@ The following bugs are resolved with this release:
7408-2005
[24867] malloc: Remove unwanted leading whitespace in malloc_info
[24879] login: Disarm timer after utmp lock acquisition
+ [24880] login: Use struct flock64 in utmp
[24986] alpha: new getegid, geteuid and getppid syscalls used
unconditionally
[25189] Don't use a custom wrapper macro around __has_include
diff --git a/login/utmp_file.c b/login/utmp_file.c
index f3c528384f..94753e0404 100644
--- a/login/utmp_file.c
+++ b/login/utmp_file.c
@@ -76,7 +76,7 @@ try_file_lock (int fd, int type)
alarm (TIMEOUT);
/* Try to get the lock. */
- struct flock fl =
+ struct flock64 fl =
{
.l_type = type,
fl.l_whence = SEEK_SET,
@@ -103,7 +103,7 @@ try_file_lock (int fd, int type)
static void
file_unlock (int fd)
{
- struct flock fl =
+ struct flock64 fl =
{
.l_type = F_UNLCK,
};
reply other threads:[~2020-01-17 14:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200117140432.46B898299EE2@oldenburg2.str.redhat.com \
--to=fweimer@redhat.com \
--cc=libc-stable@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).