tftpd: cleanup
Sponsored by: Klara, Inc.
This commit is contained in:
parent
714f6f9c14
commit
eb0292d929
@ -7,7 +7,6 @@ PROG= tftpd
|
|||||||
MAN= tftpd.8
|
MAN= tftpd.8
|
||||||
SRCS= tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c tftp-utils.c
|
SRCS= tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c tftp-utils.c
|
||||||
SRCS+= tftpd.c
|
SRCS+= tftpd.c
|
||||||
WFORMAT=0
|
|
||||||
|
|
||||||
.if ${MK_TCP_WRAPPERS} != "no"
|
.if ${MK_TCP_WRAPPERS} != "no"
|
||||||
CFLAGS+= -DLIBWRAP
|
CFLAGS+= -DLIBWRAP
|
||||||
|
@ -28,13 +28,13 @@
|
|||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/tftp.h>
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
#include <arpa/tftp.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -28,10 +28,10 @@
|
|||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <sys/sysctl.h>
|
||||||
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/tftp.h>
|
#include <arpa/tftp.h>
|
||||||
@ -91,7 +91,7 @@ option_tsize(int peer __unused, struct tftphdr *tp __unused, int mode,
|
|||||||
|
|
||||||
if (mode == RRQ)
|
if (mode == RRQ)
|
||||||
asprintf(&options[OPT_TSIZE].o_reply,
|
asprintf(&options[OPT_TSIZE].o_reply,
|
||||||
"%ju", stbuf->st_size);
|
"%ju", (uintmax_t)stbuf->st_size);
|
||||||
else
|
else
|
||||||
/* XXX Allows writes of all sizes. */
|
/* XXX Allows writes of all sizes. */
|
||||||
options[OPT_TSIZE].o_reply =
|
options[OPT_TSIZE].o_reply =
|
||||||
|
@ -28,11 +28,11 @@
|
|||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/tftp.h>
|
#include <arpa/tftp.h>
|
||||||
|
@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/tftp.h>
|
#include <arpa/tftp.h>
|
||||||
|
@ -52,8 +52,9 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/tftp.h>
|
#include <arpa/tftp.h>
|
||||||
@ -68,6 +69,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "tftp-file.h"
|
#include "tftp-file.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user