utmp fallback not complete enough
ibid.ag at gmail.com
ibid.ag at gmail.com
Thu Oct 15 04:42:09 UTC 2015
On Thu, Oct 15, 2015 at 04:17:03PM +1300, Alastair Hughes wrote:
> I've just tried to build busybox 1.24.0 against musl, however the build
> fails because musl does not define _PATH_WTMP in utmpx.h (it's defined
> in utmp.h).
musl does not *implement* the utmp(x) interfaces; it stubs them out.
The maintainer considers them a fundamentally harmful feature,
essentially equivalent to automatically posting your location on
Foursquare or (insert social site).
Internally, utmp* is generally a binary log of system events like
login/logout/runlevel changes, publicly available to all users (often
chmod a+rw).
(Of course, due to that last bit, it *should* not be used for things
like figuring out the current runlevel, or most of the uses that it's
put to...)
Your best bet is goingg to be disabling utmp* support completely;
anything that requires it wouldn't work right anyhow.
> This is caused by commit 86a7f18f211af1abda5c855d2674b0fcb53de524
> (*: Switch to POSIX utmpx API), and the workaround for uclibc
> (7d86384b246434e72533332f7f409a7aa9efeacb (include: Fallback to UTMP
> unless there is UTMPX support)) does not work for musl, as it only
> checks for __UCLIBC__ or __GLIBC__.
>
> I'm not sure what would be an appropriate fix; POSIX appears to not
> include _PATH_WTMP [1] at all? What would be a good way of fixing this?
Maybe
#ifndef _PATH_WTMP
//define it to a default, or include paths.h
would work to get it building, but it won't actually help you.
HTH,
Isaac
More information about the busybox
mailing list