Discussion:
Code for #ifdef KERBEROS in rsh.c
t***@jp.sony.com
2014-06-06 08:21:11 UTC
Permalink
Hi.

Most of kerberos support code is removed from rsh.c in rev. 1.29, but
there is still few lines of code enclosed by #ifdef KERBEROS.

Do we still need those code? If not, I'll delete them before commiting
bug fix.

enami.

Index: rsh.c
===================================================================
RCS file: /cvsroot/src/usr.bin/rsh/rsh.c,v
retrieving revision 1.33
diff -u -r1.33 rsh.c
--- rsh.c 29 Aug 2011 14:22:46 -0000 1.33
+++ rsh.c 6 Jun 2014 08:20:05 -0000
@@ -282,9 +282,6 @@
else
pid = -1;

-#if defined(KERBEROS) && defined(CRYPT)
- if (!doencrypt)
-#endif
{
(void)ioctl(remerr, FIONBIO, &one);
(void)ioctl(rem, FIONBIO, &one);
@@ -310,12 +307,7 @@
return 0;

errno = 0;
-#if defined(KERBEROS) && defined(CRYPT)
- if (doencrypt)
- nr = des_read(fdp->fd, buf, sizeof buf);
- else
-#endif
- nr = read(fdp->fd, buf, sizeof buf);
+ nr = read(fdp->fd, buf, sizeof buf);

if (nr <= 0) {
if (errno != EAGAIN)
@@ -380,12 +372,7 @@
if ((fdp->revents & POLLOUT) == 0)
goto rewrite;

-#if defined(KERBEROS) && defined(CRYPT)
- if (doencrypt)
- nw = des_write(rem, bp, nr);
- else
-#endif
- nw = write(rem, bp, nr);
+ nw = write(rem, bp, nr);

if (nw < 0) {
if (errno == EAGAIN)
Christos Zoulas
2014-06-06 16:44:53 UTC
Permalink
Post by t***@jp.sony.com
Hi.
Most of kerberos support code is removed from rsh.c in rev. 1.29, but
there is still few lines of code enclosed by #ifdef KERBEROS.
Do we still need those code? If not, I'll delete them before commiting
bug fix.
Remove it; it is a pity, because the code for krb4 was removed instead of
being converted to krb5. But as you noticed, very little of it is left and
it is best to be gone completely.

christos
t***@jp.sony.com
2014-06-08 01:57:41 UTC
Permalink
Post by Christos Zoulas
Remove it; it is a pity, because the code for krb4 was removed instead of
being converted to krb5. But as you noticed, very little of it is left and
it is best to be gone completely.
Thanks, I've just remove it.

enami.

Loading...