Bug 1198478

Summary: ccname_file_dummy is not unlinked on error
Product: Red Hat Enterprise Linux 6 Reporter: Martin Kosek <mkosek>
Component: sssdAssignee: SSSD Maintainers <sssd-maint>
Status: CLOSED ERRATA QA Contact: Kaushik Banerjee <kbanerje>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: grajaiya, jgalipea, jhrozek, lslebodn, mkosek, mzidek, pbrezina, preichl
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.12.4-7.el6 Doc Type: Bug Fix
Doc Text:
Do not document.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-22 06:43:18 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:

Description Martin Kosek 2015-03-04 08:57:05 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/2592

Function ldap_child_get_tgt_sync in ldap_child.c is creating file ccname_file_dummy but it is not unlinked if there is an error.  This can cause a lot of these files to be created using up inodes on the file system.

Comment 1 Jakub Hrozek 2015-03-04 18:48:00 UTC
* master: 2b20ff2e33ad3993a9cad910c4b4b828513613df
* sssd-1-12: 0b5036e4c652e6983a3352c045c8701d6573587b

Comment 3 Kaushik Banerjee 2015-03-23 10:43:37 UTC
Verified in version sssd-1.12.4-11.el6.x86_64

Output from beaker automation run:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: krb_bug_20: BZ1198478 ccache files are not removed on error
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

spawn ktutil
ktutil:  addent -password -p bla -k 1 -e aes256-cts-hmac-sha1-96
Password for bla: 
ktutil:  wkt /tmp/bla.keytab
ktutil:  q
Stopping sssd: [  OK  ]
Starting sssd: [  OK  ]
:: [ 08:46:00 ] :: Sleeping for 5 seconds
Sleeping for 2 minutes...
ls: cannot access /var/lib/sss/db/ccache*: No such file or directory
:: [   PASS   ] :: File '/var/log/sssd/ldap_child.log' should contain 'Unlinking' 
ls: cannot access /var/lib/sss/db/ccache*: No such file or directory
:: [   PASS   ] :: ccache files are unlinked on error 
krb-bug-20-BZ1198478-ccache-files-are-not-removed-on-error result: PASS

Comment 5 errata-xmlrpc 2015-07-22 06:43:18 UTC
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.

https://rhn.redhat.com/errata/RHBA-2015-1448.html