Module Name: src Committed By: joe Date: Tue Jan 7 21:15:40 UTC 2025
Modified Files: src/dist/pf/usr.sbin/ftp-proxy: filter.c ftp-proxy.c Log Message: clearn up : remove trailing whitespaces To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/dist/pf/usr.sbin/ftp-proxy/filter.c cvs rdiff -u -r1.4 -r1.5 src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/dist/pf/usr.sbin/ftp-proxy/filter.c diff -u src/dist/pf/usr.sbin/ftp-proxy/filter.c:1.3 src/dist/pf/usr.sbin/ftp-proxy/filter.c:1.4 --- src/dist/pf/usr.sbin/ftp-proxy/filter.c:1.3 Wed Feb 2 02:20:26 2011 +++ src/dist/pf/usr.sbin/ftp-proxy/filter.c Tue Jan 7 21:15:40 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: filter.c,v 1.3 2011/02/02 02:20:26 rmind Exp $ */ +/* $NetBSD: filter.c,v 1.4 2025/01/07 21:15:40 joe Exp $ */ /* $OpenBSD: filter.c,v 1.6 2007/08/01 09:31:41 henning Exp $ */ /* @@ -185,7 +185,7 @@ do_rollback(void) if (ioctl(dev, DIOCXROLLBACK, &pft) == -1) return (-1); - + return (0); } @@ -202,7 +202,7 @@ init_filter(char *opt_qname, char *opt_t else if (opt_verbose == 2) rule_log = PF_LOG_ALL; - dev = open("/dev/pf", O_RDWR); + dev = open("/dev/pf", O_RDWR); if (dev == -1) err(1, "/dev/pf"); if (ioctl(dev, DIOCGETSTATUS, &status) == -1) @@ -248,7 +248,7 @@ prepare_commit(u_int32_t id) return (0); } - + int prepare_rule(u_int32_t id, int rs_num, struct sockaddr *src, struct sockaddr *dst, u_int16_t d_port) @@ -356,7 +356,7 @@ server_lookup(struct sockaddr *client, s if (client->sa_family == AF_INET) return (server_lookup4(satosin(client), satosin(proxy), satosin(server))); - + if (client->sa_family == AF_INET6) return (server_lookup6(satosin6(client), satosin6(proxy), satosin6(server))); @@ -379,7 +379,7 @@ server_lookup4(struct sockaddr_in *clien memcpy(&pnl.daddr.v4, &proxy->sin_addr.s_addr, sizeof pnl.daddr.v4); pnl.sport = client->sin_port; pnl.dport = proxy->sin_port; - + if (ioctl(dev, DIOCNATLOOK, &pnl) == -1) return (-1); @@ -389,7 +389,7 @@ server_lookup4(struct sockaddr_in *clien memcpy(&server->sin_addr.s_addr, &pnl.rdaddr.v4, sizeof server->sin_addr.s_addr); server->sin_port = pnl.rdport; - + return (0); } @@ -407,7 +407,7 @@ server_lookup6(struct sockaddr_in6 *clie memcpy(&pnl.daddr.v6, &proxy->sin6_addr.s6_addr, sizeof pnl.daddr.v6); pnl.sport = client->sin6_port; pnl.dport = proxy->sin6_port; - + if (ioctl(dev, DIOCNATLOOK, &pnl) == -1) return (-1); Index: src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c diff -u src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c:1.4 src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c:1.5 --- src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c:1.4 Wed Feb 2 02:20:26 2011 +++ src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c Tue Jan 7 21:15:40 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: ftp-proxy.c,v 1.4 2011/02/02 02:20:26 rmind Exp $ */ +/* $NetBSD: ftp-proxy.c,v 1.5 2025/01/07 21:15:40 joe Exp $ */ /* $OpenBSD: ftp-proxy.c,v 1.15 2007/08/15 15:18:02 camield Exp $ */ /* @@ -177,7 +177,7 @@ client_parse(struct session *s) if (s->cmd == CMD_PORT || s->cmd == CMD_EPRT) return (allow_data_connection(s)); } - + if (anonymous_only && (linebuf[0] == 'U' || linebuf[0] == 'u')) return (client_parse_anon(s)); @@ -379,7 +379,7 @@ get_line(char *buf, size_t *valid) linelen = i + 1; linebuf[linelen] = '\0'; *valid -= linelen; - + /* Move leftovers to the start. */ if (*valid != 0) bcopy(buf + linelen, buf, *valid); @@ -545,7 +545,6 @@ handle_signal(int sig, short event, void exit_daemon(); } - struct session * init_session(void) @@ -799,7 +798,7 @@ main(int argc, char *argv[]) logmsg(LOG_ERR, "cannot drop privileges: %s", strerror(errno)); exit(1); } - + event_init(); /* Setup signal handler. */ @@ -983,7 +982,7 @@ allow_data_connection(struct session *s) * port collisions, to aid security (some systems pick weak * ports) or to satisfy RFC requirements (source port 20). */ - + /* Cast this once, to make code below it more readable. */ client_sa = sstosa(&s->client_ss); server_sa = sstosa(&s->server_ss); @@ -1100,7 +1099,7 @@ allow_data_connection(struct session *s) fops->do_rollback(); return (0); } - + void server_read(struct bufferevent *bufev, void *arg) {