This is only required for the single fchmod(2) ensuring default permissions
which only happens in the -c code path; "fattr" without "cpath" makes no
sense here.
OK?
Index: tftpd.c
===================================================================
RCS file: /cvs/src/usr.sbin/tftpd/tftpd.c,v
retrieving revision 1.49
diff -u -p -r1.49 tftpd.c
--- tftpd.c 4 Oct 2022 23:33:22 -0000 1.49
+++ tftpd.c 4 Oct 2022 23:43:06 -0000
@@ -399,7 +399,7 @@ main(int argc, char *argv[])
if (pledge("stdio rpath wpath cpath fattr dns inet", NULL) ==
-1)
lerr(1, "pledge");
} else if (canwrite) {
- if (pledge("stdio rpath wpath fattr dns inet", NULL) == -1)
+ if (pledge("stdio rpath wpath dns inet", NULL) == -1)
lerr(1, "pledge");
} else {
if (pledge("stdio rpath dns inet", NULL) == -1)