Bug 643556

Summary: [RFE] nss-sysinit: setup-nsssysinit.sh should be able to report current status
Product: Red Hat Enterprise Linux 6 Reporter: Elio Maldonado Batiz <emaldona>
Component: nssAssignee: Elio Maldonado Batiz <emaldona>
Status: CLOSED ERRATA QA Contact: Aleš Mareček <amarecek>
Severity: low Docs Contact:
Priority: low    
Version: 6.1CC: amarecek, emaldona, kdudka, kengert, rrelyea, snagar, thoger
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nss-3.12.9-1.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 636801 Environment:
Last Closed: 2011-05-19 14:03:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 636801    
Bug Blocks:    

Description Elio Maldonado Batiz 2010-10-15 23:16:53 UTC
+++ This bug was initially created as a clone of Bug #636801 +++

Description of problem:
setup-nsssysinit.sh should be able to report whether nss-sysinit is currently enabled or disabled.  It can recognize additional command line argument value - such as 'status' - and print info when that is provided.  Similar check is already done for 'off' action, so it may look as:

grep -q '^library=libnsssysinit' /etc/pki/nssdb/pkcs11.txt && echo 'ON' || echo 'OFF'

Version-Release number of selected component (if applicable):
nss-3.12.7-6.fc13

--- Additional comment from emaldona on 2010-09-28 14:12:30 EDT ---

Created attachment 450266 [details]
Adds command line option to report on nss-sysinit current status

It also includes the fix for Bug 636792.

--- Additional comment from thoger on 2010-09-29 06:13:43 EDT ---

Created attachment 450436 [details]
Updated patch

Updated patch with few more changes.

(In reply to comment #1)
> Created attachment 450266 [details]
> Adds command line option to report on nss-sysinit current status

For the sake of consistency, I'd probably avoid using two different ways to do the same check:
  if [ `grep '^library=libnsssysinit' ${p11conf}` ];
  grep -q '^library=libnsssysinit' ${p11conf}

I've actually moved this test to separate function to avoid duplication.

I've also extended status output to be a little more verbose.  Feel free to change if you find it better to say "NSS sysinit is on/off" instead of "NSS sysinit is enabled/disabled".

> It also includes the fix for Bug 636792.

Moved umask call a bit.

--- Additional comment from emaldona on 2010-09-29 12:16:13 EDT ---

Thank you, this is much better. I prefer using enabled/disabled in the display but need to keep the options on|off for compatibility sake as we don't want to break scripts that may already be expecting on or off. 

By the way, since we are writing man pages for the nss security tools I should add a little man page for this script as well.

--- Additional comment from updates on 2010-09-29 20:25:58 EDT ---

nss-3.12.7-8.fc14,nss-softokn-3.12.7-7.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/nss-3.12.7-8.fc14,nss-softokn-3.12.7-7.fc14

--- Additional comment from updates on 2010-09-29 20:29:58 EDT ---

nss-3.12.7-8.fc13,nss-softokn-3.12.7-7.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/nss-3.12.7-8.fc13,nss-softokn-3.12.7-7.fc13

--- Additional comment from updates on 2010-09-30 01:31:44 EDT ---

nss-3.12.7-8.fc14, nss-softokn-3.12.7-7.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update nss nss-softokn'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/nss-3.12.7-8.fc14,nss-softokn-3.12.7-7.fc14

--- Additional comment from updates on 2010-10-07 14:19:25 EDT ---

nss-3.12.8-2.fc14,nss-softokn-3.12.8-1.fc14,nss-util-3.12.8-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/nss-3.12.8-2.fc14,nss-softokn-3.12.8-1.fc14,nss-util-3.12.8-1.fc14

--- Additional comment from updates on 2010-10-07 20:07:46 EDT ---

nss-util-3.12.8-1.fc12,nss-softokn-3.12.8-1.fc12,nss-3.12.8-2.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/nss-util-3.12.8-1.fc12,nss-softokn-3.12.8-1.fc12,nss-3.12.8-2.fc12

Comment 5 errata-xmlrpc 2011-05-19 14:03:46 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0692.html