Created attachment 1805 [details] OpenSSH + FreeBSD's utmpx In order to make utmpx logging and lastlog information work on FreeBSD HEAD, the attached patch is required. FreeBSD's <utmpx.h> doesn't declare all sorts of path name definitions. Its lastlog interface is also part of the utmpx API itself.
Comment on attachment 1805 [details] OpenSSH + FreeBSD's utmpx >- >-dnl utmpx detection - I don't know any system so perverse as to require >-dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out >-dnl there, though. >-AC_MSG_CHECKING([if your system defines UTMPX_FILE]) >-AC_TRY_COMPILE([ >-#include <sys/types.h> >-#include <utmp.h> >-#ifdef HAVE_UTMPX_H >-#include <utmpx.h> >-#endif >-#ifdef HAVE_PATHS_H >-# include <paths.h> >-#endif >- ], >- [ char *utmpx = UTMPX_FILE; ], >- [ AC_MSG_RESULT(yes) ], >- [ AC_MSG_RESULT(no) >- system_utmpx_path=no ] >-) >-if test -z "$conf_utmpx_location"; then >- if test x"$system_utmpx_path" = x"no" ; then >- AC_DEFINE(DISABLE_UTMPX) >- fi >-else >- AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location", >- [Define if you want to specify the path to your utmpx file]) >-fi Why are you deleting this section? This might affect platforms other than FreeBSD.
I am quite sure that this won't cause any breakage. As long as the implementation provides the utmpx structure and the functions required by POSIX, why shouldn't we use it then? FreeBSD's <utmpx.h> doesn't provide the *TMPX_FILE definitions which are present in other implementations for two reasons: - It is not standardized by POSIX. - I never want applications to access the utmpx files manually.
(In reply to comment #2) > I am quite sure that this won't cause any breakage. As long as the > implementation provides the utmpx structure and the functions required > by POSIX, why shouldn't we use it then? but your change also disables the setting of CONF_UTMPX_FILE based on anything that sets conf_utmpx_location (which seems to include at least the netbsd pkgsrc package). That said, nothing in our code actually uses CONF_UTMPX_FILE, so maybe it doesn't matter (any more?)
(In reply to comment #3) > That said, nothing in our code actually uses CONF_UTMPX_FILE, so maybe > it doesn't matter (any more?) Exactly!
OK, sold! Thanks for the patch, it has been applied and will be in 5.5p1.
Mass move of bugs RESOLVED->CLOSED following the release of openssh-5.5p1