Commit graph

14 commits

Author SHA1 Message Date
cinap_lenrek e4f30c89f4 ip/tftpd: add -m argument for name substitution using regular expressions
This allows mapping incoming filenames to a different name
using regular expressions, followed by subtitutions
of the %[ICE] format strings.

I needed this to have individual cmdline.txt files for
netbooted raspberry pi's. In this example, i map cmdline.txt
to %C, which gets substituted for /cfg/pxe/$ether of the client.
2022-02-05 01:34:22 +00:00
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
cinap_lenrek 63a0d519bc dhcpd(8), ndb(6): group related ndb attributes together 2019-01-24 20:30:14 +01:00
cinap_lenrek d1a0091b56 dhcpd(8), ndb(6): update documentation (thanks k0ga) 2019-01-23 20:58:52 +01:00
cinap_lenrek 615f43b76e ip/dhcpd: Add swap server support in dhcpd (thanks k0ga) 2018-11-08 21:15:07 +01:00
cinap_lenrek 065c3557af ip/dhcpd, ip/tftpd: change default for tftp homedir to / 2018-10-08 02:11:36 +02:00
cinap_lenrek 08385e6681 ip/tftpd: remove sunkernel hack 2018-09-13 22:15:42 +02:00
cinap_lenrek a3f3e31b20 dhcp6d: add minimal stateless DHCPv6 server for network boot and DNS configuration 2018-06-10 22:08:57 +02:00
stanley lieber e35616cb66 /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
stanley lieber d057d67bed /sys/lib/rootstub 2017-12-11 19:34:15 -05:00
stanley lieber e6658c55af dhcpd(8): the fs attribute refers to the file server, not the name server (thanks, pena) 2015-06-18 14:28:25 -04:00
stanley lieber 2867e54fc1 remove references to 9load(8) from most pages that mention it. 2011-04-13 02:58:33 +00:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen b41b903422 Import sources from 2011-03-30 iso image - sys/man 2011-03-30 16:49:47 +03:00