diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 2008-11-19 10:43:57 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 2008-11-19 10:43:57 +0000 |
commit | f982be45e81588a27383cd1a3eb12789b8498904 (patch) | |
tree | 07be283d015b2c39f95e655cb7328ff355bc47fa /security/krb5-16/files/patch-lib-rpc-svc_tcp.c | |
parent | - Fix modes of the temp directory [1] (diff) |
This commit was manufactured by cvs2svn to create tag 'RELEASE_6_4_0'.release/6.4.0
Notes
Notes:
svn path=/head/; revision=223035
svn path=/tags/RELEASE_6_4_0/; revision=223036; tag=release/6.4.0
Diffstat (limited to 'security/krb5-16/files/patch-lib-rpc-svc_tcp.c')
-rw-r--r-- | security/krb5-16/files/patch-lib-rpc-svc_tcp.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/security/krb5-16/files/patch-lib-rpc-svc_tcp.c b/security/krb5-16/files/patch-lib-rpc-svc_tcp.c deleted file mode 100644 index 9c51fafc62bf..000000000000 --- a/security/krb5-16/files/patch-lib-rpc-svc_tcp.c +++ /dev/null @@ -1,51 +0,0 @@ -=== lib/rpc/svc_tcp.c -================================================================== ---- lib/rpc/svc_tcp.c (revision 1666) -+++ lib/rpc/svc_tcp.c (local) -@@ -54,6 +54,14 @@ - extern errno; - */ - -+#ifndef FD_SETSIZE -+#ifdef NBBY -+#define NOFILE (sizeof(int) * NBBY) -+#else -+#define NOFILE (sizeof(int) * 8) -+#endif -+#endif -+ - /* - * Ops vector for TCP/IP based rpc service handle - */ -@@ -215,6 +223,19 @@ - register SVCXPRT *xprt; - register struct tcp_conn *cd; - -+#ifdef FD_SETSIZE -+ if (fd >= FD_SETSIZE) { -+ (void) fprintf(stderr, "svc_tcp: makefd_xprt: fd too high\n"); -+ xprt = NULL; -+ goto done; -+ } -+#else -+ if (fd >= NOFILE) { -+ (void) fprintf(stderr, "svc_tcp: makefd_xprt: fd too high\n"); -+ xprt = NULL; -+ goto done; -+ } -+#endif - xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT)); - if (xprt == (SVCXPRT *)NULL) { - (void) fprintf(stderr, "svc_tcp: makefd_xprt: out of memory\n"); -@@ -271,6 +292,10 @@ - * make a new transporter (re-uses xprt) - */ - xprt = makefd_xprt(sock, r->sendsize, r->recvsize); -+ if (xprt == NULL) { -+ close(sock); -+ return (FALSE); -+ } - xprt->xp_raddr = addr; - xprt->xp_addrlen = len; - xprt->xp_laddr = laddr; - |