aboutsummaryrefslogtreecommitdiff
path: root/inet/rexec.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /inet/rexec.c
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.bz2
2.5-18.1
Diffstat (limited to 'inet/rexec.c')
-rw-r--r--inet/rexec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/inet/rexec.c b/inet/rexec.c
index 3c14836..07ddeea 100644
--- a/inet/rexec.c
+++ b/inet/rexec.c
@@ -87,8 +87,11 @@ rexec_af(ahost, rport, name, pass, cmd, fd2p, af)
return (-1);
}
*ahost = ahostbuf;
- } else
+ } else {
*ahost = NULL;
+ __set_errno (ENOENT);
+ return -1;
+ }
ruserpass(res0->ai_canonname, &name, &pass);
retry:
s = __socket(res0->ai_family, res0->ai_socktype, 0);
@@ -111,7 +114,8 @@ retry:
port = 0;
} else {
char num[32];
- int s2, sa2len;
+ int s2;
+ socklen_t sa2len;
s2 = __socket(res0->ai_family, res0->ai_socktype, 0);
if (s2 < 0) {
@@ -136,7 +140,7 @@ retry:
port = atoi(servbuff);
(void) sprintf(num, "%u", port);
(void) __write(s, num, strlen(num)+1);
- { int len = sizeof (from);
+ { socklen_t len = sizeof (from);
s3 = TEMP_FAILURE_RETRY (accept(s2, (struct sockaddr *)&from,
&len));
__close(s2);