mirror of
https://git.savannah.gnu.org/git/inetutils.git
synced 2026-01-12 00:19:39 +08:00
rlogind, rshd: Protocol coherence.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user