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

Re: What, why, where, utmp?



miquels@cistron.nl (Miquel van Smoorenburg) writes:

> In article <[🔎] Pine.LNX.3.96.971203202743.180A-100000@dwarf.polaris.net>,
> Dale Scheetz <dwarf@polaris.net> 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
> >shell.
> 
> 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.


Guy


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: