summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ip/tftpd.c
AgeCommit message (Collapse)Author
2022-02-05ip/tftpd: add -m argument for name substitution using regular expressionscinap_lenrek
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.
2021-04-11ip/tftpd: add a syslog message about what error we return to the client on a NAKcinap_lenrek
2021-02-23ip/tftpd: add -n namespace-file flag (thanks sam-d)cinap_lenrek
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-23ip/tftpd: use procsetuser() instead of writing #c/usercinap_lenrek
2019-02-25ip/tftpd: fix %.*s format for homedir pathcinap_lenrek
2018-10-08ip/dhcpd, ip/tftpd: change default for tftp homedir to /cinap_lenrek
2018-09-13ip/tftpd: remove sunkernel hackcinap_lenrek
2018-05-22ip/tftpd: deal with block wrap arroundcinap_lenrek
2015-08-25fix fuckupglenda
2015-08-25import E script from bell labsmischief
2015-07-11tftpd: count only options we understand so we wont send empty oack messagecinap_lenrek
2014-07-13tftpd: fix error string packet overflow in nak(), fix syslog reportingcinap_lenrek
2012-09-20tftp: prevent it from hanging if ack packets get lostcinap_lenrek
send ACK reply for duplicate data packets in case our ack response got lost. make sure packets are in sequence and ignore out of oder packets (except the ones we'v already acked).
2012-09-18tftpd: apply sstallion's tftpd-rfc patch (from sources)cinap_lenrek
tftpd option handling is not RFC-compliant. This causes picky clients (such as curl) to fail transfers.
2012-03-09tftpd: import from sourcescinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen