aargh, I forgot to commit this. This fixes an optimization originally

for rdist-6.1.0, which is not quite valid on 6.1.2 when used with an
alternate rsh-like transport (such as ssh).
This commit is contained in:
Peter Wemm 1996-08-16 17:05:49 +00:00
parent abca0ff042
commit a8032cb64c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=3624

View file

@ -35,8 +35,8 @@ diff -c -r1.1.1.1 -r1.2
if (becomeuser() != 0)
exit(1);
#else /* !DIRECT_RCMD */
! if (geteuid() == 0) {
! debugmsg(DM_MISC, "I am root, therefore direct rcmd\n");
! if (geteuid() == 0 && strcmp(path_remsh, _PATH_REMSH) == 0) {
! debugmsg(DM_MISC, "I am root, using rsh, therefore direct rcmd\n");
(void) signal(SIGPIPE, sighandler);
+
+ if (port < 0) {