Bug 441680 - tcsd init problems
tcsd init problems
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: trousers (Show other bugs)
5.2
All Linux
low Severity low
: rc
: ---
Assigned To: Avesh Agarwal
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-09 09:53 EDT by Chris Ward
Modified: 2013-04-12 15:40 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-20 12:36:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Ward 2008-04-09 09:53:40 EDT
Description of problem:
There are a few minor issues with the init script for tcsd.

First:
When starting tcsd on a system which doesn't have modules present in the
$MOD_DIR directory (MOD_DIR=/lib/modules/$(uname -r)/kernel/drivers/char/tpm),
specified in /etc/rc.d/init.d/tcsd, there is an error present in the output.

-----
%> service tcsd start
/etc/init.d/tcsd: line 34: cd:
/lib/modules/2.6.18-53.1.14.el5PAE/kernel/drivers/char/tpm: No such file or
directory
                                                           [FAILED]
Starting tcsd:                                             [FAILED]
                                                           [  OK  ]
------

The function load_drivers() doesn't check first whether $MOD_DIR exists before
changing directories.

If no modules are present in MOD_DIR (or it doesn't exist), then the init
process should probably give up and return fail out of this function. 

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

Second: 
As can be seen in the above output, the log message for what is actually FAILED
or OK isn't output. I suggest keeping things consistent and use:

echo -n $"SHORT MESSAGE"
if [[ ... ]]; then
  success;
else
  failure;
fi


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

Third:
When executing 'start', if we encounter a failure in loading the correct
drivers, does it really make sense to continue trying to start TCSD?

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

Fourth:
There is no log message indicating what action is being run here, but there is
output indicating "it" is OK: 

screen output,
----
#                                                        [  OK  ]
----
comes from this line:

        touch /var/lock/subsys/tcsd && success

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


Fifth:

If the $TCSD $START_OPT command returns 0, it outputs OK. Good. However, if it
doesn't, then it reports nothing. Init scripts should be more robust to report
the failures as well as the successes.

---------------
Sixth:

My interpretation of the LSB standards we are trying to meet at Red Hat leads me
to think that if the modules aren't able to be located, the script should exit
with '5' # program is not installed

---------------
Seventh:

Thanks!


Version-Release number of selected component (if applicable):
trousers-0.3.1-4.el5
Comment 1 RHEL Product and Program Management 2008-07-21 19:03:45 EDT
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 10 RHEL Product and Program Management 2013-03-20 12:36:44 EDT
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

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