Bug 441680 - tcsd init problems
Summary: tcsd init problems
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: trousers
Version: 5.2
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Avesh Agarwal
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-09 13:53 UTC by Chris Ward
Modified: 2013-04-12 19:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-20 16:36:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Chris Ward 2008-04-09 13:53:40 UTC
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 Program Management 2008-07-21 23:03:45 UTC
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 Program Management 2013-03-20 16:36:44 UTC
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.