rlogind, rshd: Protocol coherence.

This commit is contained in:
Mats Erik Andersson
2012-07-27 14:14:46 +02:00
parent c239b98317
commit 4689d41a2a
7 changed files with 189 additions and 53 deletions

View File

@@ -431,14 +431,17 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
realm)) != SHISHI_OK)
goto bad2;
write (s, *remuser, strlen (*remuser) + 1);
if (locuser && locuser[0])
write (s, locuser, strlen (locuser) + 1);
else
write (s, *remuser, strlen (*remuser) + 1);
# endif /* SHISHI */
write (s, cmd, strlen (cmd) + 1);
# ifdef SHISHI
write (s, *remuser, strlen (*remuser) + 1);
write (s, &zero, sizeof (int));
write (s, &zero, sizeof (int)); /* XXX: not protocol */
# endif
if ((rc = read (s, &c, 1)) != 1)
@@ -459,6 +462,7 @@ kcmd (Shishi ** h, int *sock, char **ahost, unsigned short rport, char *locuser,
break;
}
status = -1;
errno = ENOENT;
goto bad2;
}
# if HAVE_SIGACTION