about summary refs log tree commit diff
path: root/login/utmp_file.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-08-15 10:30:23 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-08-15 10:30:23 +0200
commit341da5b4b6253de9a7581a066f33f89cacb44dec (patch)
tree50f20a48b3ae28208afe5a17842791ce00bbfeb9 /login/utmp_file.c
parentdda373b00e812d14ac7e228d117f9047ceee38c9 (diff)
downloadglibc-341da5b4b6253de9a7581a066f33f89cacb44dec.tar.gz
glibc-341da5b4b6253de9a7581a066f33f89cacb44dec.tar.xz
glibc-341da5b4b6253de9a7581a066f33f89cacb44dec.zip
login: Fix updwtmp, updwtmx unlocking
Commit 5a3afa9738f3dbbaf8c0a35665318c1af782111b (login: Replace
macro-based control flow with function calls in utmp) introduced
a regression because after it, __libc_updwtmp attempts to unlock
the wrong file descriptor.
Diffstat (limited to 'login/utmp_file.c')
-rw-r--r--login/utmp_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/login/utmp_file.c b/login/utmp_file.c
index 7bd6034af4..5e4e66d1d0 100644
--- a/login/utmp_file.c
+++ b/login/utmp_file.c
@@ -503,7 +503,7 @@ __libc_updwtmp (const char *file, const struct utmp *utmp)
   result = 0;
 
 unlock_return:
-  file_unlock (file_fd);
+  file_unlock (fd);
   file_lock_restore (&fl);
 
   /* Close WTMP file.  */