This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[glibc] login: Use struct flock64 in utmp [BZ #24880]


https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0d5b2917530ccaf8ad312dfbb7bce69d569c23ad

commit 0d5b2917530ccaf8ad312dfbb7bce69d569c23ad
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Aug 15 16:09:20 2019 +0200

    login: Use struct flock64 in utmp [BZ #24880]
    
    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.

Diff:
---
 ChangeLog         | 6 ++++++
 login/utmp_file.c | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b8a9a18..b13346c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2019-08-15  Florian Weimer  <fweimer@redhat.com>
 
+	[BZ #24880]
+	* login/utmp_file.c (file_locking_failed): Use struct flock64.
+	(file_locking_unlock): Likewise.
+
+2019-08-15  Florian Weimer  <fweimer@redhat.com>
+
 	[BZ #24879]
 	login: Disarm timer after utmp lock acquisition.
 	* login/utmp_file.c (struct file_locking): Remove.
diff --git a/login/utmp_file.c b/login/utmp_file.c
index f3c5283..94753e0 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,
     };


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]