From: Silas McCroskey <inkswinc@gmail.com>
To: 9front@9front.org
Subject: [9front] Re: add "-n namespace-file" flag to tftpd
Date: Sun, 7 Feb 2021 22:28:35 -0800 [thread overview]
Message-ID: <CAHjwAuyLO_CyyaP9kWKmqgqj1SZWMa+7-LOEKXz96esXHxGQ5w@mail.gmail.com> (raw)
In-Reply-To: <CAHjwAuzWsMNG4MzXXQ3U3X31DMovaU+AHMAhr_xvzd_KjTRcaw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 135 bytes --]
wow, I never realized gmail's plaintext mode suckage extended to
converting tabs to spaces as well. Attaching separately too.
- sam-d
[-- Attachment #2.1: Type: text/plain, Size: 383 bytes --]
from postmaster@1ess:
The following attachment had content that we can't
prove to be harmless. To avoid possible automatic
execution, we changed the content headers.
The original header was:
Content-Type: text/x-patch; charset="US-ASCII"; name="tftpd-n.patch"
Content-Disposition: attachment; filename="tftpd-n.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_kkw723og0>
[-- Attachment #2.2: tftpd-n.patch.suspect --]
[-- Type: application/octet-stream, Size: 1284 bytes --]
diff -r 6f8455ea95e6 sys/man/8/dhcpd
--- a/sys/man/8/dhcpd Sat Jan 23 04:21:08 2021 +0000
+++ b/sys/man/8/dhcpd Mon Feb 08 06:28:01 2021 +0000
@@ -42,6 +42,8 @@
.IR homedir ]
.RB [ -x
.IR netmtpt ]
+.RB [ -n
+.IR namespace-file ]
.SH DESCRIPTION
These programs support booting over the Internet.
They should all be run on the same server to
@@ -318,6 +320,9 @@
.B r
Restricts access to only those files rooted in the
.IR homedir .
+.TP
+.B n
+Sets the namespace file (default /lib/namespace).
.PD
.SH FILES
.BR /lib/ndb/dhcp " directory of dynamic address files
diff -r 6f8455ea95e6 sys/src/cmd/ip/tftpd.c
--- a/sys/src/cmd/ip/tftpd.c Sat Jan 23 04:21:08 2021 +0000
+++ b/sys/src/cmd/ip/tftpd.c Mon Feb 08 06:28:01 2021 +0000
@@ -93,6 +93,7 @@
char *dirsl;
int dirsllen;
char *homedir = "/";
+char *nsfile = nil;
char flog[] = "ipboot";
char net[Maxpath];
@@ -138,6 +139,9 @@
case 'x':
setnetmtpt(net, sizeof net, EARGF(usage()));
break;
+ case 'n':
+ nsfile = EARGF(usage());
+ break;
default:
usage();
}ARGEND
@@ -744,7 +748,7 @@
if(fd < 0 || write(fd, "none", strlen("none")) < 0)
sysfatal("can't become none: %r");
close(fd);
- if(newns("none", nil) < 0)
+ if(newns("none", nsfile) < 0)
sysfatal("can't build namespace: %r");
}
next prev parent reply other threads:[~2021-02-08 7:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 6:25 [9front] " Silas McCroskey
2021-02-08 6:28 ` Silas McCroskey [this message]
2021-02-08 21:30 ` kvik
2021-02-08 23:44 ` hiro
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=CAHjwAuyLO_CyyaP9kWKmqgqj1SZWMa+7-LOEKXz96esXHxGQ5w@mail.gmail.com \
--to=inkswinc@gmail.com \
--cc=9front@9front.org \
/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).