[comp.unix.wizards] How do you login user on BSD4.3 ?

johnc@haddock.UUCP (04/02/87)

Hi there, BSD wizards!  I've got a question for you.  A while ago, I posted
a program of mine (uutty) to mod.sources that acts a lot like uugetty, but
is public domain, and does a few other useful things.

Now I find myself with access to a Berserkeley 4.3 machine; we can't put
uugetty on it (licensing, y'know); it looks like a job for uutty.

Fine, except for the code that decides the user is a good guy, and overwrites
the appropriate line in /etc/utmp to get him/her/it registered as a logged-in
user.  According to our linker, there is no such thing as pututline().  The
manual doesn't seem to say anything about this set of functions, so I guess
they are a SYS5 goodie.  But some of them, like getutent(), are found in one
of the BSD libraries, so the package is at least partly present.

Now, we have lots of source, so I guess I could go raiding, but there is the
thing about licensing.  I don't want the program to end up containing code
that is owned by the U of California or by AT&T.  What I need is the straight
info on how BSD expects programs like getty or uugetty to register a user as
logged in.  Do I hunt down the /etc/utmp entry myself, back up, and overwrite
the entry?  This seems a bit risky.  I'd like to do it in a way that is nice
and portable to new releases, like I can in SYS5.  

It's possible that it is just documented somewhere in my manuals where I can't
find it.  If your answer is RTFM, can you tell me where it may be documented?
It's not in utmp(5), nor in login(1), init(8), who(1), or ac(8), as hinted in
the utmp(5) page.  (In fact, ac(8) doesn't seem to exist anywhere. :-)  Even
a list of useful keywords would probably help.  

I hope I don't have to RTFC [Read The F***ing Code].  Much as I love reading C 
programs, I'd rather not in this case.  Licensing, y'know.

-- 
	John Chambers	(617)247-1155
	...!ima!johnc	
[No, I don't work at cdx39 any more.]