Bug 483356 - /etc/init.d/ldap script assumes files in /tmp can be executed
Summary: /etc/init.d/ldap script assumes files in /tmp can be executed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: openldap
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jan Zeleny
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-30 22:11 UTC by Wes Morgan
Modified: 2010-03-30 08:05 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 08:05:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0198 0 normal SHIPPED_LIVE Moderate: openldap security and bug fix update 2010-03-29 13:22:42 UTC

Description Wes Morgan 2009-01-30 22:11:35 UTC
Description of problem: slapd init script assumes /tmp (or $TMP) is executable, but setting noexec on a /tmp partition is a common (and recommended) security practice. It creates a wrapper script in that directory and then tries to execute it, which will fail with a cryptic permission denied error from bash.


Version-Release number of selected component (if applicable): 2.3.43-3.el5


How reproducible: Every time.


Steps to Reproduce:
1. Mount /tmp as a separate partition
2. Set the noexec option on it in fstab
3. Install openldap-servers package
4. Try to start with /sbin/service ldap start
  
Actual results:
permission denied error from bash (mentions the generated wrapper filename, e.g. /tmp/start-slapd.654321)


Expected results:
slapd starts

Additional info:
This wrapper should be created somewhere that is more often consider safe for executables. Maybe /var/run/openldap. It looks like it's created to work around some issues w/ the daemon command, so maybe it could be fixed there too.

Comment 1 Jan Safranek 2009-03-10 12:26:25 UTC
This was fixed in Fedora some time ago and should be backported to RHEL.

Comment 5 Jan Zeleny 2009-11-16 09:49:31 UTC
Patch is in CVS, changing status to MODIFIED.

Comment 7 Ondrej Moriš 2010-01-12 10:05:03 UTC
Succesfully verified on i386 and x86_64.

Comment 9 errata-xmlrpc 2010-03-30 08:05:51 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/RHSA-2010-0198.html


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