plan9fox/sys
cinap_lenrek 27ad886c95 ip/tftpd: add -n namespace-file flag (thanks sam-d)
tftpd currently unconditionally sets its namespace via /lib/namespace
(newns("none", nil)), which stymied my attempts to pxe boot the
openbsd installer without creating a real /etc dir on 9front, which
would've been gross.

I tried working around this with -h (and -r for good measure), but
again hit issues because the namespace is rebuilt from scratch -- any
binds of /386, /amd64, /cfg/pxe, etc. into the tftp-specific directory
disappeared from tftpd's namespace and rendered my *9front* boxes
unable to boot. I could maintain copies of the needed files in the
tftp-specific directory, but that'd be kind of a drag.

The following patch adds a -n flag to allow the specification of a
namespace file in place of /lib/namespace; similar to ip/ftpd.

I thought about setting up a /lib/namespace.tftp to act as a default
rather than continuing to use /lib/namespace by default (which
security-wise is about the same as allowing 9p mounts by user none,
which I also have disabled), but I had trouble coming up with a sane
default. Maybe someone more experienced would like to try that out.

- sam-d
2021-02-23 01:47:33 +01:00
..
doc /sys/doc: fix mkfile to and remove files that now can be regenerated 2017-05-09 16:23:48 +02:00
games/lib fortunes: That depends on how you define native. -- Andre Garzia 2021-02-09 23:11:08 -05:00
include ape/lib9: expose fd2path (thanks phil9) 2021-02-20 21:02:07 -08:00
lib [9front] mimetype: add entry for .patch extension 2021-02-08 21:09:17 -08:00
man ip/tftpd: add -n namespace-file flag (thanks sam-d) 2021-02-23 01:47:33 +01:00
src ip/tftpd: add -n namespace-file flag (thanks sam-d) 2021-02-23 01:47:33 +01:00