CVS commit: src/usr.sbin/faithd
Module Name:src Committed By: joerg Date: Fri Sep 16 15:39:37 UTC 2011 Modified Files: src/usr.sbin/faithd: faithd.c faithd.h Log Message: Use __dead To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/faithd/faithd.c cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/faithd/faithd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/faithd/faithd.c diff -u src/usr.sbin/faithd/faithd.c:1.34 src/usr.sbin/faithd/faithd.c:1.35 --- src/usr.sbin/faithd/faithd.c:1.34 Tue Aug 30 21:14:06 2011 +++ src/usr.sbin/faithd/faithd.c Fri Sep 16 15:39:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: faithd.c,v 1.34 2011/08/30 21:14:06 joerg Exp $ */ +/* $NetBSD: faithd.c,v 1.35 2011/09/16 15:39:37 joerg Exp $ */ /* $KAME: faithd.c,v 1.62 2003/08/19 21:20:33 itojun Exp $ */ /* @@ -96,7 +96,7 @@ static int inetd_main(int, char **); static int daemon_main(int, char **); static void play_service(int) __dead; -static void play_child(int, struct sockaddr *); +static void play_child(int, struct sockaddr *) __dead; static int faith_prefix(struct sockaddr *); static int map6to4(struct sockaddr_in6 *, struct sockaddr_in *); static void sig_child(int); Index: src/usr.sbin/faithd/faithd.h diff -u src/usr.sbin/faithd/faithd.h:1.11 src/usr.sbin/faithd/faithd.h:1.12 --- src/usr.sbin/faithd/faithd.h:1.11 Tue Aug 30 21:14:06 2011 +++ src/usr.sbin/faithd/faithd.h Fri Sep 16 15:39:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: faithd.h,v 1.11 2011/08/30 21:14:06 joerg Exp $ */ +/* $NetBSD: faithd.h,v 1.12 2011/09/16 15:39:37 joerg Exp $ */ /* $KAME: faithd.h,v 1.9 2002/05/09 09:41:24 itojun Exp $ */ /* @@ -34,7 +34,7 @@ extern int dflag; extern void tcp_relay(int, int, const char *) __dead; -extern void ftp_relay(int, int); +extern void ftp_relay(int, int) __dead; extern int ftp_active(int, int, int *, int *); extern int ftp_passive(int, int, int *, int *); extern void exit_success(const char *, ...) __dead __printflike(1, 2);
CVS commit: src/usr.sbin/faithd
Module Name:src Committed By: joerg Date: Tue Aug 30 21:14:06 UTC 2011 Modified Files: src/usr.sbin/faithd: faithd.c faithd.h tcp.c Log Message: __dead + __printflike To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/faithd/faithd.c cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/faithd/faithd.h \ src/usr.sbin/faithd/tcp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/faithd/faithd.c diff -u src/usr.sbin/faithd/faithd.c:1.33 src/usr.sbin/faithd/faithd.c:1.34 --- src/usr.sbin/faithd/faithd.c:1.33 Fri Nov 26 18:58:43 2010 +++ src/usr.sbin/faithd/faithd.c Tue Aug 30 21:14:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: faithd.c,v 1.33 2010/11/26 18:58:43 christos Exp $ */ +/* $NetBSD: faithd.c,v 1.34 2011/08/30 21:14:06 joerg Exp $ */ /* $KAME: faithd.c,v 1.62 2003/08/19 21:20:33 itojun Exp $ */ /* @@ -95,19 +95,18 @@ static int inetd_main(int, char **); static int daemon_main(int, char **); -static void play_service(int); +static void play_service(int) __dead; static void play_child(int, struct sockaddr *); static int faith_prefix(struct sockaddr *); static int map6to4(struct sockaddr_in6 *, struct sockaddr_in *); static void sig_child(int); -static void sig_terminate(int); +static void sig_terminate(int) __dead; static void start_daemon(void); -static void exit_stderr(const char *, ...) - __attribute__((__format__(__printf__, 1, 2))); +static void exit_stderr(const char *, ...) __printflike(1, 2) __dead; static void grab_myaddrs(void); static void free_myaddrs(void); static void update_myaddrs(void); -static void usage(void) __attribute__((__noreturn__)); +static void usage(void) __dead; int main(int argc, char **argv) @@ -675,7 +674,7 @@ (long)pid, status); } -void +static void /*ARGSUSED*/ sig_terminate(int sig) { Index: src/usr.sbin/faithd/faithd.h diff -u src/usr.sbin/faithd/faithd.h:1.10 src/usr.sbin/faithd/faithd.h:1.11 --- src/usr.sbin/faithd/faithd.h:1.10 Fri Nov 26 18:58:43 2010 +++ src/usr.sbin/faithd/faithd.h Tue Aug 30 21:14:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: faithd.h,v 1.10 2010/11/26 18:58:43 christos Exp $ */ +/* $NetBSD: faithd.h,v 1.11 2011/08/30 21:14:06 joerg Exp $ */ /* $KAME: faithd.h,v 1.9 2002/05/09 09:41:24 itojun Exp $ */ /* @@ -33,14 +33,12 @@ extern char logname[]; extern int dflag; -extern void tcp_relay(int, int, const char *); +extern void tcp_relay(int, int, const char *) __dead; extern void ftp_relay(int, int); extern int ftp_active(int, int, int *, int *); extern int ftp_passive(int, int, int *, int *); -extern void exit_success(const char *, ...) - __attribute__((__format__(__printf__, 1, 2))); -extern void exit_failure(const char *, ...) - __attribute__((__format__(__printf__, 1, 2))); +extern void exit_success(const char *, ...) __dead __printflike(1, 2); +extern void exit_failure(const char *, ...) __dead __printflike(1, 2); #define DEFAULT_PORT_NAME telnet #define DEFAULT_DIR /usr/libexec Index: src/usr.sbin/faithd/tcp.c diff -u src/usr.sbin/faithd/tcp.c:1.10 src/usr.sbin/faithd/tcp.c:1.11 --- src/usr.sbin/faithd/tcp.c:1.10 Fri Nov 26 18:58:43 2010 +++ src/usr.sbin/faithd/tcp.c Tue Aug 30 21:14:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp.c,v 1.10 2010/11/26 18:58:43 christos Exp $ */ +/* $NetBSD: tcp.c,v 1.11 2011/08/30 21:14:06 joerg Exp $ */ /* $KAME: tcp.c,v 1.10 2002/08/20 23:01:01 itojun Exp $ */ /* @@ -64,11 +64,11 @@ static time_t parent_lastactive = (time_t)0; static void sig_ctimeout(int); -static void sig_child(int); +static void sig_child(int) __dead; static void notify_inactive(void); static void notify_active(void); static void send_data(int, int, const char *, int); -static void relay(int, int, const char *, int); +static void relay(int, int, const char *, int) __dead; /* * Inactivity timer:
CVS commit: src/usr.sbin/faithd
Module Name:src Committed By: christos Date: Fri Nov 26 18:58:43 UTC 2010 Modified Files: src/usr.sbin/faithd: Makefile faithd.c faithd.h ftp.c prefix.c tcp.c Log Message: KNF, pass lint. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/faithd/Makefile cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/faithd/faithd.c cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/faithd/faithd.h \ src/usr.sbin/faithd/tcp.c cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/faithd/ftp.c cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/faithd/prefix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/faithd/Makefile diff -u src/usr.sbin/faithd/Makefile:1.4 src/usr.sbin/faithd/Makefile:1.5 --- src/usr.sbin/faithd/Makefile:1.4 Mon May 28 08:06:34 2007 +++ src/usr.sbin/faithd/Makefile Fri Nov 26 13:58:43 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2007/05/28 12:06:34 tls Exp $ +# $NetBSD: Makefile,v 1.5 2010/11/26 18:58:43 christos Exp $ USE_FORT?= yes # network server @@ -6,6 +6,6 @@ SRCS= faithd.c tcp.c ftp.c prefix.c MAN= faithd.8 -#CFLAGS+= -DFAITH4 +#CPPFLAGS+= -DFAITH4 .include bsd.prog.mk Index: src/usr.sbin/faithd/faithd.c diff -u src/usr.sbin/faithd/faithd.c:1.32 src/usr.sbin/faithd/faithd.c:1.33 --- src/usr.sbin/faithd/faithd.c:1.32 Sat Dec 15 11:32:07 2007 +++ src/usr.sbin/faithd/faithd.c Fri Nov 26 13:58:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: faithd.c,v 1.32 2007/12/15 16:32:07 perry Exp $ */ +/* $NetBSD: faithd.c,v 1.33 2010/11/26 18:58:43 christos Exp $ */ /* $KAME: faithd.c,v 1.62 2003/08/19 21:20:33 itojun Exp $ */ /* @@ -77,7 +77,6 @@ char *serverpath = NULL; char *serverarg[MAXARGV + 1]; -static char *faithdname = NULL; char logname[BUFSIZ]; char procname[BUFSIZ]; struct myaddrs { @@ -94,22 +93,21 @@ static int inetd = 0; static char *configfile = NULL; -int main __P((int, char **)); -static int inetd_main __P((int, char **)); -static int daemon_main __P((int, char **)); -static void play_service __P((int)); -static void play_child __P((int, struct sockaddr *)); -static int faith_prefix __P((struct sockaddr *)); -static int map6to4 __P((struct sockaddr_in6 *, struct sockaddr_in *)); -static void sig_child __P((int)); -static void sig_terminate __P((int)); -static void start_daemon __P((void)); -static void exit_stderr __P((const char *, ...)) +static int inetd_main(int, char **); +static int daemon_main(int, char **); +static void play_service(int); +static void play_child(int, struct sockaddr *); +static int faith_prefix(struct sockaddr *); +static int map6to4(struct sockaddr_in6 *, struct sockaddr_in *); +static void sig_child(int); +static void sig_terminate(int); +static void start_daemon(void); +static void exit_stderr(const char *, ...) __attribute__((__format__(__printf__, 1, 2))); -static void grab_myaddrs __P((void)); -static void free_myaddrs __P((void)); -static void update_myaddrs __P((void)); -static void usage __P((void)); +static void grab_myaddrs(void); +static void free_myaddrs(void); +static void update_myaddrs(void); +static void usage(void) __attribute__((__noreturn__)); int main(int argc, char **argv) @@ -119,13 +117,9 @@ * Initializing stuff */ - faithdname = strrchr(argv[0], '/'); - if (faithdname) - faithdname++; - else - faithdname = argv[0]; + setprogname(argv[0]); - if (strcmp(faithdname, faithd) != 0) { + if (strcmp(getprogname(), faithd) != 0) { inetd = 1; return inetd_main(argc, argv); } else @@ -150,9 +144,10 @@ } if (strrchr(argv[0], '/') == NULL) - snprintf(path, sizeof(path), %s/%s, DEFAULT_DIR, argv[0]); + (void)snprintf(path, sizeof(path), %s/%s, DEFAULT_DIR, + argv[0]); else - snprintf(path, sizeof(path), %s, argv[0]); + (void)snprintf(path, sizeof(path), %s, argv[0]); #ifdef USE_ROUTE grab_myaddrs(); @@ -165,26 +160,26 @@ #endif melen = sizeof(me); - if (getsockname(STDIN_FILENO, (struct sockaddr *)me, melen) 0) { + if (getsockname(STDIN_FILENO, (void *)me, melen) == -1) { exit_failure(getsockname: %s, strerror(errno)); /*NOTREACHED*/ } fromlen = sizeof(from); - if (getpeername(STDIN_FILENO, (struct sockaddr *)from, fromlen) 0) { + if (getpeername(STDIN_FILENO, (void *)from, fromlen) == -1) { exit_failure(getpeername: %s, strerror(errno)); /*NOTREACHED*/ } - if (getnameinfo((struct sockaddr *)me, melen, NULL, 0, - sbuf, sizeof(sbuf), NI_NUMERICHOST) == 0) + if (getnameinfo((void *)me, melen, NULL, 0, + sbuf, (socklen_t)sizeof(sbuf), NI_NUMERICHOST) == 0) service = sbuf; else service = DEFAULT_PORT_NAME; - if (getnameinfo((struct sockaddr *)me, melen, NULL, 0, - snum, sizeof(snum), NI_NUMERICHOST) != 0) - snprintf(snum, sizeof(snum), ?); + if (getnameinfo((void *)me, melen, NULL, 0, + snum, (socklen_t)sizeof(snum), NI_NUMERICHOST) != 0) + (void)snprintf(snum, sizeof(snum), ?); - snprintf(logname, sizeof(logname), faithd %s, snum);
CVS commit: src/usr.sbin/faithd
Module Name:src Committed By: joerg Date: Fri Jan 15 19:19:32 UTC 2010 Modified Files: src/usr.sbin/faithd: faithd.8 Log Message: Use .%U for URLs instead of .%O. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/faithd/faithd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/faithd/faithd.8 diff -u src/usr.sbin/faithd/faithd.8:1.27 src/usr.sbin/faithd/faithd.8:1.28 --- src/usr.sbin/faithd/faithd.8:1.27 Sat Jan 9 10:43:11 2010 +++ src/usr.sbin/faithd/faithd.8 Fri Jan 15 19:19:32 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: faithd.8,v 1.27 2010/01/09 10:43:11 mbalmer Exp $ +.\ $NetBSD: faithd.8,v 1.28 2010/01/15 19:19:32 joerg Exp $ .\ $KAME: faithd.8,v 1.37 2002/05/09 14:21:23 itojun Exp $ .\ .\ Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -369,7 +369,7 @@ .%A Kazu Yamamoto .%T An IPv6-to-IPv4 transport relay translator .%B RFC 3142 -.%O ftp://ftp.isi.edu/in-notes/rfc3142.txt +.%U ftp://ftp.isi.edu/in-notes/rfc3142.txt .%D June 2001 .Re .\
CVS commit: src/usr.sbin/faithd
Module Name:src Committed By: mbalmer Date: Sat Jan 9 10:43:12 UTC 2010 Modified Files: src/usr.sbin/faithd: faithd.8 Log Message: Various language fixes. From FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/faithd/faithd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/faithd/faithd.8 diff -u src/usr.sbin/faithd/faithd.8:1.26 src/usr.sbin/faithd/faithd.8:1.27 --- src/usr.sbin/faithd/faithd.8:1.26 Sun Oct 25 01:34:40 2009 +++ src/usr.sbin/faithd/faithd.8 Sat Jan 9 10:43:11 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: faithd.8,v 1.26 2009/10/25 01:34:40 wiz Exp $ +.\ $NetBSD: faithd.8,v 1.27 2010/01/09 10:43:11 mbalmer Exp $ .\ $KAME: faithd.8,v 1.37 2002/05/09 14:21:23 itojun Exp $ .\ .\ Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -28,7 +28,7 @@ .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\ SUCH DAMAGE. .\ -.Dd October 25, 2009 +.Dd January 9, 2010 .Dt FAITHD 8 .Os .Sh NAME @@ -42,22 +42,20 @@ .Op Ar serverpath Op Ar serverargs .Nm .Sh DESCRIPTION +The .Nm -provides IPv6-to-IPv4 TCP relay. -.Nm -must be used on an IPv4/v6 dual stack router. +utility provides IPv6-to-IPv4 TCP relaying. +It can only be used on an IPv4/v6 dual stack router. .Pp When .Nm receives .Tn TCPv6 -traffic, -.Nm -will relay the +traffic, it will relay the .Tn TCPv6 traffic to .Tn TCPv4 . -Destination for relayed +The destination for the relayed .Tn TCPv4 connection will be determined by the last 4 octets of the original .Tn IPv6 @@ -73,14 +71,14 @@ the traffic will be relayed to IPv4 destination .Li 10.1.1.1 . .Pp -To use +To use the .Nm translation service, an IPv6 address prefix must be reserved for mapping IPv4 addresses into. -Kernel must be properly configured to route all the TCP connection +The kernel must be properly configured to route all the TCP connections toward the reserved IPv6 address prefix into the .Xr faith 4 -pseudo interface, by using +pseudo interface, using the .Xr route 8 command. Also, @@ -91,7 +89,7 @@ .Dv 1 . .Pp The router must be configured to capture all the TCP traffic -toward reserved +for the reserved .Tn IPv6 address prefix, by using .Xr route 8 @@ -99,22 +97,22 @@ .Xr sysctl 8 commands. .Pp +The .Nm -needs a special name-to-address translation logic, so that -hostnames gets resolved into special +utility needs special name-to-address translation logic, so that +hostnames gets resolved into the special .Tn IPv6 address prefix. -For small-scale installation, use -.Xr hosts 5 . -For large-scale installation, it is useful to have +For small-scale installations, use +.Xr hosts 5 ; +For large-scale installations, it is useful to have a DNS server with special address translation support. An implementation called .Nm totd -is available -at +is available at .Pa http://www.vermicelli.pasta.cs.uit.no/software/totd.html . -Make sure you do not propagate translated DNS records to normal DNS cloud, -it is highly harmful. +Make sure you do not propagate translated DNS records over to normal +DNS, as it can cause severe problems. .Ss Daemon mode When .Nm @@ -146,10 +144,11 @@ to .Nm , you can run local daemons on the router. +The .Nm -will invoke local daemon at +utility will invoke ia local daemon at .Ar serverpath -if the destination address is local interface address, +if the destination address is a local interface address, and will perform translation to IPv4 TCP in other cases. You can also specify .Ar serverargs @@ -177,7 +176,7 @@ .Nm includes special support for protocols used by .Xr ftp 1 . -When translating FTP protocol, +When translating the FTP protocol, .Nm translates network level addresses in .Li PORT/LPRT/EPRT @@ -186,8 +185,8 @@ commands. .Pp Inactive sessions will be disconnected in 30 minutes, -to avoid stale sessions from chewing up resources. -This may be inappropriate for some of the services +to prevent stale sessions from chewing up resources. +This may be inappropriate for some services .Pq should this be configurable? . .Ss inetd mode When @@ -195,13 +194,13 @@ is invoked via .Xr inetd 8 , .Nm -will handle connection passed from standard input. +will handle connections passed from standard input. If the connection endpoint is in the reserved IPv6 address prefix, .Nm will relay the connection. Otherwise, .Nm -will invoke service-specific daemon like +will invoke a service-specific daemon like .Xr telnetd 8 , by using the command argument passed from .Xr inetd 8 . @@ -213,14 +212,14 @@ .Nm is invoked via .Xr inetd 8 -on FTP port, it will operate as a FTP relay. +on the FTP port, it will operate as an FTP relay. .\.Pp .\The operation mode requires special support for .\.Nm .\in .\.Xr inetd 8 . .Ss Access control -To prevent malicious accesses, +To prevent malicious access, .Nm implements a simple
CVS commit: src/usr.sbin/faithd
Module Name:src Committed By: lukem Date: Sun Apr 19 06:09:42 UTC 2009 Modified Files: src/usr.sbin/faithd: ftp.c prefix.c Log Message: Fix -Wsign-compare issues To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/faithd/ftp.c cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/faithd/prefix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/faithd/ftp.c diff -u src/usr.sbin/faithd/ftp.c:1.17 src/usr.sbin/faithd/ftp.c:1.18 --- src/usr.sbin/faithd/ftp.c:1.17 Wed May 24 21:47:25 2006 +++ src/usr.sbin/faithd/ftp.c Sun Apr 19 06:09:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ftp.c,v 1.17 2006/05/24 21:47:25 christos Exp $ */ +/* $NetBSD: ftp.c,v 1.18 2009/04/19 06:09:42 lukem Exp $ */ /* $KAME: ftp.c,v 1.23 2003/08/19 21:20:33 itojun Exp $ */ /* @@ -429,7 +429,7 @@ if (ftp_activeconn() 0) { n = snprintf(rbuf, sizeof(rbuf), 425 Cannot open data connetion\r\n); -if (n 0 || n = sizeof(rbuf)) +if (n 0 || n = (int)sizeof(rbuf)) n = 0; } } @@ -508,7 +508,7 @@ passivefail: n = snprintf(sbuf, sizeof(sbuf), 500 could not translate from PASV\r\n); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(src, sbuf, n); @@ -570,7 +570,7 @@ UC(a[8]), UC(a[9]), UC(a[10]), UC(a[11]), UC(a[12]), UC(a[13]), UC(a[14]), UC(a[15]), 2, UC(p[0]), UC(p[1])); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(dst, sbuf, n); @@ -580,7 +580,7 @@ n = snprintf(sbuf, sizeof(sbuf), 229 Entering Extended Passive Mode (|||%d|)\r\n, ntohs(sin6-sin6_port)); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(dst, sbuf, n); @@ -680,7 +680,7 @@ if (epsvall) { n = snprintf(sbuf, sizeof(sbuf), 501 %s disallowed in EPSV ALL\r\n, cmd); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(src, sbuf, n); @@ -697,7 +697,7 @@ if (n != 21 || af != 6 || hal != 16|| pal != 2) { n = snprintf(sbuf, sizeof(sbuf), 501 illegal parameter to LPRT\r\n); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(src, sbuf, n); @@ -721,7 +721,7 @@ lprtfail: n = snprintf(sbuf, sizeof(sbuf), 500 could not translate to PORT\r\n); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(src, sbuf, n); @@ -766,7 +766,7 @@ n = snprintf(sbuf, sizeof(sbuf), PORT %d,%d,%d,%d,%d,%d\r\n, UC(a[0]), UC(a[1]), UC(a[2]), UC(a[3]), UC(p[0]), UC(p[1])); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(dst, sbuf, n); @@ -791,7 +791,7 @@ if (epsvall) { n = snprintf(sbuf, sizeof(sbuf), 501 %s disallowed in EPSV ALL\r\n, cmd); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(src, sbuf, n); @@ -807,7 +807,7 @@ eprtparamfail: n = snprintf(sbuf, sizeof(sbuf), 501 illegal parameter to EPRT\r\n); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(src, sbuf, n); @@ -831,7 +831,7 @@ if (n != 1 || af != 2) { n = snprintf(sbuf, sizeof(sbuf), 501 unsupported address family to EPRT\r\n); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(src, sbuf, n); @@ -845,7 +845,7 @@ if (error) { n = snprintf(sbuf, sizeof(sbuf), 501 EPRT: %s\r\n, gai_strerror(error)); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(src, sbuf, n); @@ -854,7 +854,7 @@ if (res-ai_next) { n = snprintf(sbuf, sizeof(sbuf), 501 EPRT: %s resolved to multiple addresses\r\n, hostp); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(src, sbuf, n); @@ -881,7 +881,7 @@ if (epsvall) { n = snprintf(sbuf, sizeof(sbuf), 501 %s disallowed in EPSV ALL\r\n, cmd); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(src, sbuf, n); @@ -890,7 +890,7 @@ /* transmit PASV */ n = snprintf(sbuf, sizeof(sbuf), PASV\r\n); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(dst, sbuf, n); @@ -908,7 +908,7 @@ wport4 = wport6 = port4 = port6 = -1; n = snprintf(sbuf, sizeof(sbuf), PASV\r\n); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n = (int)sizeof(sbuf)) n = 0; if (n) write(dst, sbuf, n); @@ -922,7 +922,7 @@ */ epsvall = 1; n = snprintf(sbuf, sizeof(sbuf), 200 EPSV ALL command successful.\r\n); - if (n 0 || n = sizeof(sbuf)) + if (n 0 || n =
CVS commit: src/usr.sbin/faithd
Module Name:src Committed By: joerg Date: Wed Apr 8 14:36:41 UTC 2009 Modified Files: src/usr.sbin/faithd: faithd.8 Log Message: Fix markup. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/faithd/faithd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/faithd/faithd.8 diff -u src/usr.sbin/faithd/faithd.8:1.23 src/usr.sbin/faithd/faithd.8:1.24 --- src/usr.sbin/faithd/faithd.8:1.23 Sun Sep 7 16:22:25 2003 +++ src/usr.sbin/faithd/faithd.8 Wed Apr 8 14:36:41 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: faithd.8,v 1.23 2003/09/07 16:22:25 wiz Exp $ +.\ $NetBSD: faithd.8,v 1.24 2009/04/08 14:36:41 joerg Exp $ .\ $KAME: faithd.8,v 1.37 2002/05/09 14:21:23 itojun Exp $ .\ .\ Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -282,7 +282,7 @@ .Nm , .Xr faith 4 interface has to be configured properly. -.Bd -literal -offset +.Bd -literal # sysctl -w net.inet6.ip6.accept_rtadv=0 # sysctl -w net.inet6.ip6.forwarding=1 # sysctl -w net.inet6.ip6.keepfaith=1 @@ -296,7 +296,7 @@ service, and provide no local telnet service, invoke .Nm as follows: -.Bd -literal -offset +.Bd -literal # faithd telnet .Ed .Pp @@ -305,12 +305,12 @@ on .Pa /usr/libexec/telnetd , use the following command line: -.Bd -literal -offset +.Bd -literal # faithd telnet /usr/libexec/telnetd telnetd .Ed .Pp If you would like to pass extra arguments to the local daemon: -.Bd -literal -offset +.Bd -literal # faithd ftp /usr/libexec/ftpd ftpd -l .Ed .Pp @@ -318,7 +318,7 @@ You may need .Fl p if the service checks the source port range. -.Bd -literal -offset +.Bd -literal # faithd ssh # faithd telnet /usr/libexec/telnetd telnetd .Ed @@ -326,7 +326,7 @@ Add the following lines into .Xr inetd.conf 5 . .\Syntax may vary depending upon your operating system. -.Bd -literal -offset +.Bd -literal telnet stream faith/tcp6 nowait root faithd telnetd ftp stream faith/tcp6 nowait root faithd ftpd -l ssh stream faith/tcp6 nowait root faithd /usr/sbin/sshd -i @@ -349,7 +349,7 @@ The following illustrates a simple .Pa faithd.conf setting. -.Bd -literal -offset +.Bd -literal # permit anyone from 3ffe:501:::/48 to use the translator, # to connect to the following IPv4 destinations: # - any location except 10.0.0.0/8 and 127.0.0.0/8.