[PATCH] configure.ac: Disable utmp/wtmp on musl-based systems

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Hi,

The configure script enables utmp and wtmp functionality by default
on musl-based systems as it detects the stubs [1] provided by the
libc. Whilst having these features enabled is not harmful, it will lead
to repeated log messages:

> wtmp_write: problem writing /dev/null/wtmp: Not a directory

The proposed patch will disable utmp and wtmp by default on musl-based
systems.

[1] https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs?

Wolfgang
diff --git a/configure.ac b/configure.ac
index 813b7fa2..c5eb0dbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -904,6 +904,12 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
 	else
 		AC_MSG_RESULT([architecture not supported])
 	fi
+	case "$host" in
+	*-*-linux-musl*)
+		AC_DEFINE([DISABLE_UTMP], [1], [Define if you don't want to use utmp])
+		AC_DEFINE([DISABLE_WTMP], [1], [Define if you don't want to use wtmp])
+		;;
+	esac
 	;;
 mips-sony-bsd|mips-sony-newsos4)
 	AC_DEFINE([NEED_SETPGRP], [1], [Need setpgrp to acquire controlling tty])
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux