Bug 1232303

Summary: sssd components mishandles sighup for helper processes
Product: Red Hat Enterprise Linux 6 Reporter: Thorsten Scherf <tscherf>
Component: sssdAssignee: Michal Zidek <mzidek>
Status: CLOSED UPSTREAM QA Contact: Kaushik Banerjee <kbanerje>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.6CC: grajaiya, jgalipea, jhrozek, lslebodn, mkosek, mzidek, pbrezina, preichl
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-11 20:15:09 UTC Type: Bug
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: 886038    
Bug Blocks: 1172231    

Description Thorsten Scherf 2015-06-16 13:01:32 UTC
Description of problem:
This BZ is related to #886038

sssd doesn't properly close fds from helper processes like krb5_child:

# ls /proc/*/fd -l| grep deleted
l-wx------. 1 root root 64 Jun  3 10:13 18 -> /var/log/sssd/krb5_child.log-20150512 (deleted)

ssd debug_log_file is opened with open_debug_file_ex(..., bool want_cloexec):

[...]

(want_cloexec) {
         flags = fcntl(debug_fd, F_GETFD, 0);
         (void) fcntl(debug_fd, F_SETFD, flags | FD_CLOEXEC);
     }

(from util/debug.c)

This is not the case for LDAP_CHILD_LOG_FILE and KRB5_CHILD_LOG_FILE:

$ grep -iR CHILD_LOG_FILE providers/
providers/krb5/krb5_init_shared.c:        ret = open_debug_file_ex(KRB5_CHILD_LOG_FILE, &debug_filep, false);
providers/ldap/sdap_child_helpers.c:        ret = open_debug_file_ex(LDAP_CHILD_LOG_FILE, &debug_filep, false);


Version-Release number of selected component (if applicable):
sssd-1.11.6-30.el6_6.3.x86_64                               

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jakub Hrozek 2015-06-16 13:06:05 UTC
Upstream ticket:
https://fedorahosted.org/sssd/ticket/2679

Comment 2 Jakub Hrozek 2015-10-11 20:15:09 UTC
The associated customer case was closed, so it's better to fix minor issues like this upstream first.