Re: What, why, where, utmp?
email@example.com (Miquel van Smoorenburg) writes:
> In article <Pine.LNX.3.96.971203202743.180Afirstname.lastname@example.org>,
> Dale Scheetz <email@example.com> wrote:
> >I know that one of the latest "fixes" to dpkg-buildpackage deals with the
> >lack of utmp entries, but don't understand why they were abandoned.
> They weren't - the size of the entries in the above mentioned database
> changed because of the move to libc6 (libc6 defines a different, more
> complete `struct utmp' which is the fixed-size entry I was talking about).
> Because of that, some old programs were unable to read the new format.
All true, but the fixes to dpkg-buildpackage aren't related. The
script is using wtmp to figure out who's logged in so that the support
files created during the sudo parts of the build get chown'd back to
the original user.
> >This command works ok if you are logged in
> >as root, but when you try to use it as a user, you get a utmp entry
> >missing error, with some statement about login only running from the base
> Presumably your root shell reckognizes "login" as a special case and does
> an "exec login" instead, and the normal user shell doesn't.
No, login doesn't do the wtmp check if you're running as root.
> By using login directly, the
> logout+new login entry never gets written so someone using "last" will only
> see the first session (which accounts for the time spent by both the first
> and the 2nd session).
No, login will keep wtmp correct.
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .