Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Dec 2015 18:13:50 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 205144] [patch] make rsh(1) compatible with recent Cisco IOS versions
Message-ID:  <bug-205144-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205144

            Bug ID: 205144
           Summary: [patch] make rsh(1) compatible with recent Cisco IOS
                    versions
           Product: Base System
           Version: 10.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: eugen@grosbein.net
          Keywords: patch

Created attachment 163996
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=163996&action=edit
rsh.diff

It's not uncommon to run periodic jobs that use rsh(1) to connect to Cisco IOS
devices (routers, switches) to manage them or collect some information not
available via SNMP using "show ..." commands.

Our rsh(1) implementation does "shutdown(rem, SHUT_WR)" when it detects
"end-of-file" condition for standard input stream to inform remote host of EOF.
Jobs created with cron(8) have standard input redirected from /dev/null and
rsh(1) calls mentioned shutdown() just after connection is created.

Recent Cisco IOS versions (e.g. 15.x) close remote shell session immediately on
receiving such end-of-stream indication that results in empty output of "show
..." commands.

Attached patch introduces new "rsh -N" option that acts like opposite to 
"rsh -n" mode preventing shutdown of socket sending path. This prevents of
premature disconnect of rsh session by remote host.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-205144-8>