From cf770b36c3afe2e84803dac195e8f4d8aab20a3d Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Mon, 3 Jan 2011 14:52:18 -0500 Subject: - in main(), return an error exit result if we can't create a socket to use for talking to the portmapper (defect #10100) --- src/portmap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/portmap.c') diff --git a/src/portmap.c b/src/portmap.c index ea2a05f..12bd34d 100644 --- a/src/portmap.c +++ b/src/portmap.c @@ -89,6 +89,10 @@ main(int argc, char **argv) printf("bound to reserved port %d\n", port); } s = portmap_create_client_socket("portmap", port); + if (s == -1) { + printf("error creating portmap/rpcbind client socket\n"); + return 1; + } setregid(2516, 2516); setreuid(2510, 2510); portmap_unregister("portmap", s, YPPROG, YPVERS, AF_INET, IPPROTO_TCP, -- cgit