Bug 242642 - [Feature] Include rt-sshd in RHEL5-RT Distribution
Summary: [Feature] Include rt-sshd in RHEL5-RT Distribution
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: realtime-kernel
Version: 1.0
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Guy Streeter
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-05 09:22 UTC by IBM Bug Proxy
Modified: 2016-02-10 01:32 UTC (History)
5 users (show)

Fixed In Version: August
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-09 19:21:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
rt-sshd script source (3.29 KB, text/plain)
2007-06-05 09:22 UTC, IBM Bug Proxy
no flags Details
rt-sshd (3.91 KB, text/plain)
2007-07-18 11:26 UTC, IBM Bug Proxy
no flags Details
rt-sshd (3.94 KB, text/plain)
2007-07-24 06:35 UTC, IBM Bug Proxy
no flags Details
rt-sshd (4.08 KB, text/plain)
2007-08-08 09:55 UTC, IBM Bug Proxy
no flags Details
sysconfig-rt-sshd (198 bytes, text/plain)
2007-08-08 09:56 UTC, IBM Bug Proxy
no flags Details


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 35219 0 None None None Never

Description IBM Bug Proxy 2007-06-05 09:22:43 UTC
LTC Owner is: dvhltc.com
LTC Originator is: dvhltc.com


rt-sshd
-------

Purpose
~~~~~~~
'rt-sshd' is a program that runs as a service to start/stop the ssh
daemon with several RT attributes. It enables running secondary sshd as a
SCHED_FIFO 99 process, listening on port number 9988. This is very
useful in logging into the system when there are a number of RT
processes running and the primary non-real-time sshd is starving and
thus refusing to allow logins.

Design
~~~~~~
When started, the program generates RSA and DSA keys and then starts
the ssh daemon as SCHED_FIFO 99 process as follows:

-------------------------------------------------------------------------------
chrt -f 99 /usr/sbin/sshd -p 9988 -o PidFile=/var/run/rt-sshd.pid -o UseDNS=no
-------------------------------------------------------------------------------

Stopping the service, kills the FIFO 99 ssh daemon.

Usage
~~~~~
-----------------------------------------------------------------------
rt-sshd {start|stop|restart|reload|condrestart|status}
-----------------------------------------------------------------------

Category
~~~~~~~~
Developer tool & general usage utility

Comment 1 IBM Bug Proxy 2007-06-05 09:22:43 UTC
Created attachment 156191 [details]
rt-sshd script source

Comment 2 Tim Burke 2007-06-05 13:48:01 UTC
Assigning to Guy Streeter.
We are likely to include several debug/diagnostic packages (which are not
intended for use in full deployment mode). this may well be an example of that
category.  assiging to Guy to initiate internal discussions on the topic.  if it
seems useful, then the request is for Guy to ensure the packaging is all set and
that the usage info gets mention in the HOWTO.

---------------

My main concern with this one is to hopefully get the packaging such that it is
independent of the core sshd package.  Its ok to have a dependency on that
package, but would prefer not to muck with that package directly - so that we
can simply inherit the maintenance stream for the sshd package without having to
maintain a complete branch.


Comment 3 Guy Streeter 2007-06-26 19:53:09 UTC
I don't see anything in the attached script that indicates it requires any sshd
package changes. Am I missing something?

Comment 4 Guy Streeter 2007-06-28 20:40:59 UTC
Do you want to include Copyright and License text in this script?

Comment 5 IBM Bug Proxy 2007-07-02 17:45:21 UTC
----- Additional Comments From sripathi.com (prefers email at sripathik.com)  2007-07-02 13:40 EDT -------
Yes, we want to add GPL license as well as author information to the script.
Since rt-sshd is based on /etc/init.d/sshd script, we want to mention something
like "Modified from original script by <author> by <ibm author>". However, there
is no license, copyright or author information in the original script. We based
the script on /etc/init.d/sshd script provided by
openssh-server-3.9p1-8.RHEL4.9. (The one shipped with RHEL4U2)

Could you please let us know the author and copyright information for the script? 

Comment 6 Guy Streeter 2007-07-02 20:14:34 UTC
I have asked our openssh maintainer about the authorship and license of the
/etc/init.d/sshd script.

Comment 7 Guy Streeter 2007-07-09 15:48:55 UTC
Our openssh maintainer says there is no information available about the author
of the init script, that it came from a contrib directory.
The license for openssh is BSD. Information is in the
/usr/share/doc/openssh-4.3p2/LICENCE file, installed by the openssh rpm.

Comment 8 IBM Bug Proxy 2007-07-18 11:25:31 UTC
----- Additional Comments From sripathi.com (prefers email at sripathik.com)  2007-07-18 07:19 EDT -------
Hi RH,

Since we don't have author information for this script, we have put the
following two lines about the origin of the script:
# Based on /etc/init.d/sshd from RedHat's openssh-server-3.9p1-8.RHEL4.9 rpm.
# Customized for RHEL5-RT by Theodore Ts'o <tytso at mit.edu>

We have also put in GPL license.

I will attach the modified rt-sshd script to the bug. Pleaes let us know if this
is fine. 

Comment 9 IBM Bug Proxy 2007-07-18 11:26:19 UTC
Created attachment 159510 [details]
rt-sshd

Comment 10 IBM Bug Proxy 2007-07-18 11:26:26 UTC
----- Additional Comments From sripathi.com (prefers email at sripathik.com)  2007-07-18 07:20 EDT -------
 
/etc/init.d/rt-sshd script with license and author information 

Comment 11 Guy Streeter 2007-07-23 20:46:15 UTC
In the header comments, the phrase "OpenSSH server daemon" appears twice. Can we
change it to something like "Realtime priority OpenSSH server daemon"?

Comment 12 Guy Streeter 2007-07-23 21:46:49 UTC
Tim Burke asked me to ask our ssh maintainer if he had any thoughts on the
advisability of running a high realtime priority sshd.
His only thought was that it might slightly increase the risk of a
Denial-of-Service attack, using multiple simultaneous connections to the rt-sshd.

I am not aware of any DoS attempts by flooding the sshd anyway.


Comment 13 IBM Bug Proxy 2007-07-24 06:30:17 UTC
------- Additional Comments From sripathi.com (prefers email at sripathik.com)  2007-07-24 02:28 EDT -------
(In reply to comment #14)
> In the header comments, the phrase "OpenSSH server daemon" appears twice. Can we
> change it to something like "Realtime priority OpenSSH server daemon"?

Okay. I'll attach the changed version of rt-sshd. 

Comment 14 IBM Bug Proxy 2007-07-24 06:35:14 UTC
Created attachment 159834 [details]
rt-sshd

Comment 15 IBM Bug Proxy 2007-07-24 06:35:18 UTC
----- Additional Comments From sripathi.com (prefers email at sripathik.com)  2007-07-24 02:30 EDT -------
 
rt-sshd with a change to description of the file 

Comment 16 Guy Streeter 2007-07-26 16:09:03 UTC
There are a few other changes I'd like to suggest:

The pidfile listed in the header comments and set in the PID_FILE variable is
not used, but if present they ought to match the actual pidfile name to avoid
confusion.

Since the port number used by rt-sshd is not a defined standard, the user might
want to change it should it interfere with something else. What do you think of
allowing the port number to be set in the /etc/sysconfig/rt-sshd file?

Is there a reason why UseDNS=no is hard-coded on the commandline?

Comment 17 IBM Bug Proxy 2007-07-30 11:30:35 UTC
------- Additional Comments From sripathi.com (prefers email at sripathik.com)  2007-07-30 07:29 EDT -------
(In reply to comment #20)
> The pidfile listed in the header comments and set in the PID_FILE variable is
> not used, but if present they ought to match the actual pidfile name to avoid
> confusion.
> 
> Since the port number used by rt-sshd is not a defined standard, the user might
> want to change it should it interfere with something else. What do you think of
> allowing the port number to be set in the /etc/sysconfig/rt-sshd file?

I made these changes. I will post the script to rhel-rt-ibm list, so that it
will draw more attention and comments. 

Comment 18 IBM Bug Proxy 2007-08-08 09:55:20 UTC
----- Additional Comments From sripathi.com (prefers email at sripathik.com)  2007-08-08 05:52 EDT -------
I will attach here the latest version of the scripts I have sent on ML. 

Comment 19 IBM Bug Proxy 2007-08-08 09:55:54 UTC
Created attachment 160893 [details]
rt-sshd

Comment 20 IBM Bug Proxy 2007-08-08 09:56:04 UTC
----- Additional Comments From sripathi.com (prefers email at sripathik.com)  2007-08-08 05:53 EDT -------
 
/etc/rc.d/init.d/rt-sshd based on sshd from RHEL5 

Comment 21 IBM Bug Proxy 2007-08-08 09:56:38 UTC
Created attachment 160894 [details]
sysconfig-rt-sshd

Comment 22 IBM Bug Proxy 2007-08-08 09:56:49 UTC
----- Additional Comments From sripathi.com (prefers email at sripathik.com)  2007-08-08 05:53 EDT -------
 
/etc/sysconfig/rt-sshd file 

Comment 23 Guy Streeter 2007-08-22 14:42:37 UTC
rt-sshd is now available in the RT partners repo.


Comment 24 Tomas Mraz 2008-03-17 14:07:19 UTC
Has anyone tested rt-sshd with SELinux enabled & enforcing?


Comment 25 Steve Grubb 2008-06-05 14:24:24 UTC
Has anyone realized that logins > port 1023 are spoofable by user land apps?
IOW, it violates any concept of trusted path login. Anyone can bind to that port
if its unused and steal passwords and then pass the connection to sshd. 

System logins need to be on ports requiring CAP_NET_BIND_SERVICE. Why can't port
22 be used for a realtime sshd? Or maybe sshd start a realtime shell for root
and drop to non-realtime shell for uid != 0.

Comment 35 Clark Williams 2008-07-09 19:21:08 UTC
We'll document how to run sshd at elevated priorities for debugging purposes.

Closing


Note You need to log in before you can comment on or make changes to this bug.