9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] tftpd vs assumptions about user none? (to have or have not home dir)
@ 2005-01-26 15:53 Axel Belinfante
  2005-01-27  1:38 ` arisawa
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Belinfante @ 2005-01-26 15:53 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I noticed that because I had a /usr/none directory  (*)
tftpd would try to serve relative file name requests
from /usr/none instead of from /lib/tftpd.

the reason is that tftpd first does a chdir
and only later (via setuser() a  newns("none", nil)
which in my case unfortuantely succeeded to cd to /usr/none
(because that directory existed, see below (*) until I
 removed it recently)

so,
a) what are the assumptions about none ?
   should not have home dir, I guess,
   other places where that matters?
   other issues?
b) would it make sense to make tftpd a bit
   more robust in this respect?
   It's probably worth noting, though, that
   I saw that in a recent tftpd.c the setuser()
   call was moved even `later' in the tftpd code,
   such that each session (via doserve()) gets its
   own clean namespace)
   from which I gather that moving setuser() _up_
   in the code till before (earlier than) the chdir
   call is likely a bad idea... 
   
Comments welcome, just trying to learn,
Axel.

(*) I added it myself (summer 2003 - history rocks :-)
and I don't remember why :-(



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-01-27  2:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-26 15:53 [9fans] tftpd vs assumptions about user none? (to have or have not home dir) Axel Belinfante
2005-01-27  1:38 ` arisawa
2005-01-27  2:21   ` [9fans] tftpd vs assumptions about user none? (to have or have Sape Mullender

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).