about summary refs log tree commit diff
path: root/inet
diff options
context:
space:
mode:
Diffstat (limited to 'inet')
-rw-r--r--inet/rcmd.c3
-rw-r--r--inet/rexec.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/inet/rcmd.c b/inet/rcmd.c
index c9c3a2fabd..f13a2e6bad 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -83,6 +83,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
 				  &hp, &herr) < 0)
 	  if (herr != NETDB_INTERNAL || errno != ERANGE)
 	    {
+	      __set_h_errno (herr);
 	      herror(*ahost);
 	      return -1;
 	    }
@@ -322,7 +323,7 @@ again:
 		char *pbuf;
 		size_t dirlen;
 		size_t buflen = __sysconf (_SC_GETPW_R_SIZE_MAX);
-		char buffer = __alloca (buflen);
+		char *buffer = __alloca (buflen);
 
 		first = 0;
 		if (getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) < 0)
diff --git a/inet/rexec.c b/inet/rexec.c
index d91949de3c..611ff57287 100644
--- a/inet/rexec.c
+++ b/inet/rexec.c
@@ -71,6 +71,7 @@ rexec(ahost, rport, name, pass, cmd, fd2p)
 				  &hp, &herr) < 0)
 	  if (herr != NETDB_INTERNAL || errno != ERANGE)
 	    {
+	      __set_h_errno (herr);
 	      herror(*ahost);
 	      return -1;
 	    }