Hide Forgot
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.
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
Pushed upstream.
(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
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
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