Re: rlinetd security
>From Dale Southard on Tuesday, 19 June, 2001:
Hrm. That could be rather easy to implement. The guaranteed
way to see if something's going to be started or not, though,
is still /etc/rc?.d
If you want to, you can replace them and create an easy
script, such as
#returns 1 if daemon is enabled, 0 otherwise.
if [ -z "$1" ]; then
echo "Error: No daemon process specified"
line=`grep -i "^$1=" $configfile 2>/dev/null | head -1`
if [ $? -ne 0 ]; then
#No such line existed. Return 0.
setting=`echo $line | sed 's/^.*=//'`;
setting=`echo $setting | perl -we '$_ = <STDIN>; s/\s+//g; print;'`
case "$setting" in
please, no comments on my perl or bash-scripting (lack of) abilities. ;)
All that would then remain is to alter the rc scripts to check chkconfig
and to NOT populate it with daemon=value lines. :)
"IBM were providing source code in the 1960's under similar terms.
VMS source code was available under limited licenses to customers
from the beginning. Microsoft are catching up with 1960."
--Alan Cox, http://www2.usermagnet.com/cox/index.html