McKown, John wrote:



Adam,

Thanks for the thought. I was, for some unfathomable reason, trying to
avoid yet another daemon being started at boot time. Why? I don't know.
But your method is interesting. Perhaps I was thinking xinet because I
really need the new process to run under the id of the user logging on
to it (because it could be used to create/modify/delete files). I guess
that it is possible to change ids in a pre-forked process. I'll need to
look into that.

It needs to be root to change to the user's ID. Therefore, I suggest
Be root until accept()
fork()*
  authenticate the user
  if (ok)
    {
        change to user
        do user stuff
    }
  report outcome
  exit()

* or similar




--

Cheers
John

-- spambait
[EMAIL PROTECTED]  [EMAIL PROTECTED]
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to