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

Bugs in the mntlib32 Bugs file.



Here's some comments on the mntlib32 Bugs file. I've been meaning to send a
message such as this for a long time, well I've finally got around to it!

>utmp.c: ++boender
>  The utmp structure as defined differs from the System V structure.
>  Now, I don't know what BSD does, but I'll look it up.

This IS the BSD structure, it's source code compatable. The wtmp file is
able to be correctly interpreted by the Sun last(1) command.

>  Do you know what POSIX says about the utmp structure?

I doubt it says much, if anything about it.

>  Also, the System V getutent, getutid, etc. calls are missing from
>  the mintlibs, but they are so dependent on fields in the utmp
>  structure that are missing in the mintlibs that they cannot be
>  written without changing the utmp structure.

Well... probably this is because BSD doesn't need all this extra info.

>  I think complying with POSIX on this would be a Good Thing; if
>  someone could send me the relevant parts, I'll write the routines.
>  Note that all kind of stuff is dependent on this and has to be
>  emulated in the mintlibs, like getlogin(), or left out altogether,
>  like ttyslot().

This is what SunOS 4.1 says about ttyslot(3V)...

TTYSLOT(3V)            C LIBRARY FUNCTIONS            TTYSLOT(3V)

NAME
     ttyslot - find the slot in the utmp file of the current pro-
     cess

SYNOPSIS
     int ttyslot()

DESCRIPTION
     ttyslot() returns the index of the current user's  entry  in
     /etc/utmp.   This  is  accomplished by actually scanning the
     file /etc/ttytab for the name  of  the  terminal  associated
     with  the  standard input, the standard output, or the error
     output (0, 1 or 2).

As SunOS has the same utmp and ttytab structures as my init(8) package the
MiNT library should be able to do the same. Similarly getlogin(3V).

>  Oh, and this: changing the utmp structure is a pretty large
>  operation, since init(1) will have to be overhauled completely.
>  As I don't think MiNT will ever write /etc/utmp and /etc/wtmp
>  structures on booting, perhaps we should leave this be.

Please note that the routines in utmp.c were merely utility routines for my
init(8) package which were added to the library because they seemed useful
to people. There are no equivalent routines in either SYSVr* or BSD.

I hope this clears things up a bit.

Steve

-- 
---------------------------------------------------------------------------
Computer Systems Administrator, Dept. of Earth Sciences, Oxford University.
E-Mail: steve@uk.ac.ox.earth (JANET) steve@earth.ox.ac.uk (Internet).
Tel:- Oxford (0865) 282110 (UK) or +44 865 282110 (International).