]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
login: Use struct flock64 in utmp [BZ #24880]
authorFlorian Weimer <fweimer@redhat.com>
Thu, 15 Aug 2019 14:09:20 +0000 (16:09 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 15 Aug 2019 14:09:20 +0000 (16:09 +0200)
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.

ChangeLog
login/utmp_file.c

index b8a9a184507c243ce4404a9cdfcff7435b8f0660..b13346c95284ef88482655c90b9e58e6d1e8e7b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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]
index f3c528384f06bb243f508a3505c64e79d9b2bda9..94753e04041fde5d7a5e8530da93c6f68d4a9dd9 100644 (file)
@@ -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,
     };