Bug 971435 - Enhance sssd init script so that it would source a configuration
Enhance sssd init script so that it would source a configuration
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sssd (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jakub Hrozek
Kaushik Banerjee
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-06 09:49 EDT by Dmitri Pal
Modified: 2013-11-21 17:19 EST (History)
7 users (show)

See Also:
Fixed In Version: sssd-1.9.2-104.el6
Doc Type: Bug Fix
Doc Text:
Do not document
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 17:19:50 EST
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 Dmitri Pal 2013-06-06 09:49:17 EDT
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/1959

Ticket was cloned from Red Hat Bugzilla (product ''RHEL RFE''): [https://bugzilla.redhat.com/show_bug.cgi?id=924356 Bug 924356]


Enhance sssd init script so that it would source a configuration file as the
majority of the other init scripts (i.e. /etc/sysconfig/sssd)
This will allow the deployments to export the NSS_HASH_ALG_SUPPORT variable
without modifying the sssd init script.
This can be accomplished by adding the configuration script (i.e. /etc/sysconfig/sssd) and checking if it can change the exported environments of sssd processes.
Comment 1 Jakub Hrozek 2013-06-06 10:17:07 EDT
To reproduce:

1. define an environment variable in /etc/sysconfig/sssd
echo "PIZZA=YUMMY" > /etc/sysconfig/sssd
2. restart the SSSD to make it source the file
3. check the environment of the sssd process and make sure the variable is reflected there
$ grep PIZZA /proc/$(pidof sssd)/environ
Comment 5 Jakub Hrozek 2013-06-25 09:40:24 EDT
Pushed upstream.
Comment 8 Jakub Hrozek 2013-10-03 04:35:59 EDT
(In reply to Jakub Hrozek from comment #1)
> To reproduce:
> 
> 1. define an environment variable in /etc/sysconfig/sssd
> echo "PIZZA=YUMMY" > /etc/sysconfig/sssd
> 2. restart the SSSD to make it source the file
> 3. check the environment of the sssd process and make sure the variable is
> reflected there
> $ grep PIZZA /proc/$(pidof sssd)/environ

Sorry, for RHEL-6 you need to export the variable. The following worked for me fine:
# cat /etc/sysconfig/sssd 
export PIZZA=YUMMY
export foo=bar
# service sssd restart
Stopping sssd: [  OK  ]
[  OK  ] sssd: [  OK  ]
# cat /proc/$(pidof sssd)/environ
TERM=xterm-256colorPIZZA=YUMMYPATH=/sbin:/usr/sbin:/bin:/usr/binPWD=
/LANG=en_US.UTF-8foo=barSHLVL=2_=/usr/sbin/sssd
Comment 9 Amith 2013-10-03 08:06:49 EDT
Verified the bz on SSSD version: sssd-1.9.2-125.el6.x86_64

Steps followed during verification:

1. As mentioned in comment #8, export variables in /etc/sysconfig/sssd file.

[root@rhel-65 ~]# cat /etc/sysconfig/sssd 
export PIZZA=YUMMY
export foo=bar

2. Restart sssd service.

[root@rhel-65 ~]# service sssd restart
Stopping sssd:                                             [  OK  ]
Starting sssd:                                             [  OK  ]
[root@rhel-65 ~]# 
[root@rhel-65 ~]# service sssd status
sssd (pid  2629) is running...

3. Verify the existence of variables in sssd environment.

[root@rhel-65 ~]# cat /proc/2629/environ 
TERM=xtermPIZZA=YUMMYPATH=/sbin:/usr/sbin:/bin:/usr/binPWD=/LANG=en_US.UTF-8foo=barSHLVL=2_=/usr/sbin/sssd
Comment 10 errata-xmlrpc 2013-11-21 17:19:50 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1680.html

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