mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: _PATH_LASTLOG
Date: Tue, 3 Dec 2013 14:34:07 -0500	[thread overview]
Message-ID: <20131203193407.GL24286@brightrain.aerifal.cx> (raw)
In-Reply-To: <CACCP0GriquyzKj4wLf2tin6H1D2vAWYXXgvK+a6-kVhBaBq7WA@mail.gmail.com>

On Tue, Dec 03, 2013 at 05:44:04PM +0000, Raphael Cohn wrote:
> Hi,
> 
> I'm trying to compile linux-pam 1.1.8 using musl-cross, and I've hit a
> compilation error in  modules/pam_lastlog/pam_lastlog.c
> 
> Essentially, this code includes the clib utmp.h (based on HAVE_UTMP_H) and
> then assumes _PATH_LASTLOG is defined.

This is a bug in pam. It should be testing #ifdef _PATH_LASTLOG.
_PATH_LASTLOG is not specified to be defined anywhere, much less
utmp.h; its presence is a glibc "feature". At present musl has some of
these paths that are fairly universally-agreed-upon in paths.h, but
it's really bad design for libc to be imposing policy for things that
have nothing to do with libc itself through the headers it installs.
(In fact, if I'm not mistaken, most distros patch glibc's paths.h to
conform to their FS layours...)

> utmp.h doesn't define this macro, but does define _PATH_UTMP and
> _PATH_WTMP. Should it? (And why are they set to /dev/null/xxx )?

These are all very good questions. At present musl does not support
storing anything to utmp, and uses /dev/null/xxx as a pathname that
will fail to open and fail to unlink (since /dev/null is required by
POSIX to exist as a device, i.e. not a directory). (Using /dev/null
would be dangerous since some broken programs unlink the utmp file and
make a new one.)

Rich


  parent reply	other threads:[~2013-12-03 19:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 17:44 _PATH_LASTLOG Raphael Cohn
2013-12-03 18:42 ` _PATH_LASTLOG Szabolcs Nagy
2013-12-03 19:09   ` _PATH_LASTLOG Raphael Cohn
2013-12-03 19:54     ` _PATH_LASTLOG Rich Felker
2013-12-03 20:10       ` _PATH_LASTLOG Raphael Cohn
2013-12-03 20:25         ` _PATH_LASTLOG Rich Felker
2013-12-03 20:44           ` _PATH_LASTLOG Laurent Bercot
2013-12-03 20:51             ` _PATH_LASTLOG Raphael Cohn
2013-12-03 21:00               ` _PATH_LASTLOG Nathan McSween
2013-12-03 21:05                 ` _PATH_LASTLOG Raphael Cohn
2013-12-03 21:42                 ` _PATH_LASTLOG Rich Felker
2013-12-03 21:38             ` _PATH_LASTLOG Rich Felker
2013-12-03 20:49           ` _PATH_LASTLOG Raphael Cohn
2013-12-03 20:51         ` _PATH_LASTLOG Laurent Bercot
2013-12-03 20:52           ` _PATH_LASTLOG Raphael Cohn
2013-12-03 19:34 ` Rich Felker [this message]
2013-12-03 19:50   ` _PATH_LASTLOG Raphael Cohn
2013-12-03 20:03     ` _PATH_LASTLOG Laurent Bercot
2013-12-03 20:11       ` _PATH_LASTLOG Raphael Cohn
2013-12-03 20:06     ` _PATH_LASTLOG Rich Felker
2013-12-03 20:18       ` _PATH_LASTLOG Raphael Cohn
2013-12-03 20:30         ` _PATH_LASTLOG Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131203193407.GL24286@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).