Subject: [netatalk-admins] remind me...

From: Alistair Riddell <[email-masked]>
Date: Fri, 13 Mar 1998 22:47:19 +0000 (GMT)

What is the difficulty with adding utmp/wtmp logging to afpd? If it's not
that hard then I might consider doing it.

Also, how hard would it be to modify netatalk so that AppleTalk was
optional? Obviously with no appletalk support then only afpd would need to
be compiled, but would it simply a matter of #ifdef'ing the appletalkisms
or is there more to it?

--
Alistair Riddell - BOFH
IT Support Department, George Watson's College, Edinburgh
Tel: +44 131 447 7931 Ext 176       Fax: +44 131 452 8594

---

From: "Gerry.Tomlinson" <[email-masked]>
Date: Mon, 16 Mar 1998 12:55:38 +0000 (GMT)

> that hard then I might consider doing it.

I raised this with Wes a long time ago -

he said:

> 
> We can put records into wtmp at the beginning of the session, after we
> know who the user is, but before we change our uid.  Putting a second
> entry in when we're done is more problematic.  I suppose we could keep
> the file descriptor open for the whole session, tho that is a little
> ugly.
> 

I said:

> couldn't the master afpd do the second entry - in the same way that
> unix login makes the initial entry and init the second.

and he replied:

>Well, yes and know.  afpd's architecture is kind of broken.  The afpd
>parent never gets control again, after it asks for the first session.
>However, we could insert the code you're talking about in the asp
>library.  We'd also need to make changes to auth.c for the initial
>login line, and in main.c, so that the parent would know whether the
>child actually logged in, or just closed the connection after forking.
>
>Probably doable.

	Gerry
---
[email-masked]
Computing Officer
Department of Computing Science, University of Newcastle, Tel: +44 191 222 8139
Newcastle upon Tyne, NE1 7RU, United Kingdom.             Fax: +44 191 222 8232

---

From: "Brad G. Parks" <[email-masked]>
Date: Mon, 16 Mar 98 11:25:38 -0600

Well, I have utmp/wtmp kinda working in afpd.  (sample below).
I use it a little differently, tho.  Users are logged in a
utmp file when they connect, but I don't keep any history of
when they disconnect.  I run the afpd on a secure server
(nobody is allowed to telnet or ftp into) so I am able to have
that utmp file world writable.

The problem I have run into is that I don't always know when
a user disconnects.  I usually have numerous entries per user.
What good does this do for me?  Given an AppleTalk address
(at least one volume must be mounted NON-AppleTalk-over-IP)
I am able to tell which user used that address last or is using
it currently.

 68>  nejama            4.63   LOGIN_PROCESS   Tue Mar  3 09:37
 69>  saucim           7.225   LOGIN_PROCESS   Mon Mar 16 11:01
 70>  --------         4.108    DEAD_PROCESS   Mon Mar 16 09:28

I am currently working on pulling my changes out so I can re-apply
them to the latest & greatest asun source.  (I've fallen behind.)

P.S. the platform I made the changes for is Solaris.

-brad parks
Unix by day, Nintendo by night
Bethel College Acadmic Computing

---

From: Mark Donnelly <[email-masked]>
Date: Mon, 16 Mar 1998 16:09:46 -0600

On Mon, 16 Mar 1998 12:55:38 +0000 (GMT) [email-masked]

>>parent never gets control again, after it asks for the first session.

Umm...I might be mistaken, but wouldn't SIGCHLD (signals when a child dies)
handle this?  From my Linux man 7 signal:

       SIGCHLD   20,17,18     B      Child stopped or terminated

Why couldn't this work?

--Mark
   "I think so Brain, but if they called them sad meals, then 
    no one would buy them."