9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Axel Belinfante <Axel.Belinfante@cs.utwente.nl>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: [9fans] tftpd vs assumptions about user none? (to have or have not home dir)
Date: Wed, 26 Jan 2005 16:53:09 +0100	[thread overview]
Message-ID: <200501261553.j0QFr9w28322@zamenhof.cs.utwente.nl> (raw)

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 :-(



             reply	other threads:[~2005-01-26 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-26 15:53 Axel Belinfante [this message]
2005-01-27  1:38 ` arisawa
2005-01-27  2:21   ` [9fans] tftpd vs assumptions about user none? (to have or have Sape Mullender

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200501261553.j0QFr9w28322@zamenhof.cs.utwente.nl \
    --to=axel.belinfante@cs.utwente.nl \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).