diff options
author | 2012-04-15 12:55:12 +0200 | |
---|---|---|
committer | 2012-04-16 01:37:48 -0400 | |
commit | 033953dcd2af648fa6e2be987fbbfeb14bc54994 (patch) | |
tree | b2653c2c1ac6f2c0180fc50db77a79b2e05a1116 /configure.ac | |
parent | 59e8364178f68f5f2308d1cbe2fa2975ca1d7f94 (diff) |
Don't leak utmpx entries on shutdown.
As far as I know, for all implementations of libutempter, the
utempter_remove_added_record() function depends on the file descriptor
passed to utempter_add_record() to still be valid. The reason for this,
is that this file descriptor is propagated to the setuid utility that is
responsible for modifying utmpx.
Modify the code to remove the utmpx entry before closing the
pseudo-terminal master device. While there, simply use
utempter_remove_record(), which takes the file descriptor explicitly.
The advantage is that this prevents potential foot-shooting in the
future. Visual inspection of the source code will make it more obvious
that utempter depends on the file descriptor.
Closes #179.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index d02062b..f796de9 100644 --- a/configure.ac +++ b/configure.ac @@ -149,7 +149,7 @@ AC_ARG_WITH([utempter], [with_utempter="$withval"], [with_utempter="check"]) AS_IF([test x"$with_utempter" != xno], - [AC_SEARCH_LIBS([utempter_remove_added_record], [utempter], + [AC_SEARCH_LIBS([utempter_remove_record], [utempter], [AC_DEFINE([HAVE_UTEMPTER], [1], [Define if libutempter is available.])], [AS_IF([test x"$with_utempter" = xcheck], [AC_MSG_WARN([Unable to find libutempter; utmp entries will not be made.])], |