Bug 13470 - openldap slapd server doesn't obey log level changes in /etc/sysconfing/slapd file, SLAPDSYSLOGLEVEL variable
Summary: openldap slapd server doesn't obey log level changes in /etc/sysconfing/slapd...
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal minor
Target Milestone: ---
Assignee: Buchan Milne
QA Contact:
URL:
Whiteboard:
Keywords: Junior_job, NEEDINFO, PATCH
Depends on:
Blocks:
 
Reported: 2014-06-02 09:12 CEST by Liutauras Adomaitis
Modified: 2018-09-30 18:14 CEST (History)
2 users (show)

See Also:
Source RPM: openldap-servers-2.4.38-1.1.mga4
CVE:
Status comment:


Attachments

Description Liutauras Adomaitis 2014-06-02 09:12:51 CEST
slapd server always run with default log level, which is 256. Changes to file /etc/sysconfing/slapd file doesn't efect slapd process, because file /usr/lib/systemd/system/slapd.service doesn't include that variable in startup line.

The fix is to change line number 11 in file /usr/lib/systemd/system/slapd.service:
ExecStart=/usr/sbin/slapd -u ${LDAP_USER} -g ${LDAP_GROUP} -h ${SLAPDURLLIST} -l ${SLAPDSYSLOGLOCALUSER}
to 
ExecStart=/usr/sbin/slapd -u ${LDAP_USER} -g ${LDAP_GROUP} -h ${SLAPDURLLIST} -l ${SLAPDSYSLOGLOCALUSER} -s ${SLAPDSYSLOGLEVEL}

That way ldap log level can now be change with /etc/sysconfig/slapd file, as it always was the standard way for mageia AFAIK.

Reproducible: 

Steps to Reproduce:
Comment 1 David Walser 2014-06-02 15:58:39 CEST
I can't see us issuing an update for Mageia 4 just for this, but it could be fixed in SVN just in case there are future updates for any other reason.

I agree with your proposed fix, and also "SLAPDSYSLOGLEVEL=0" should be added to the Environment line in slapd.service.  Furthermore, SLAPDCONF, FIXPERMS, AUTORECOVER, RUN_DB_BACKUP, KEEP_ARCHIVES_DAYS, and MAXFILES are not used by slapd.service, so they should be removed from openldap.sysconfig.

Version: 4 => Cauldron
Assignee: bugsquad => bgmilne

Comment 2 Samuel Verschelde 2015-05-19 19:05:45 CEST
Has any fix been committed yet? Mageia 5 is nearing.

Keywords: (none) => Junior_job, PATCH

Samuel Verschelde 2015-06-06 16:13:19 CEST

Keywords: (none) => NEEDINFO

Comment 3 David Walser 2015-06-08 12:48:24 CEST
Actually I was wrong about removing SLAPDCONF, RUN_DB_BACKUP, and KEEP_ARCHIVES_DAYS, as they're used by a cron job called ldap-hot-db-backup.

SLAPDCONF is also used by several other scripts and scriplets in the package.  Those should be using the same SLAPDCONF as the service, so ieally, the service file would support that variable.  However, it's complicated by the fact that some of the things that use it support it being either a config file or a config directory, as slapd itself supports either, but for slapd which type it is changes which option it's used with (-f for a file, -F for a directory).  I don't know that there's a good way to support that kind of logic in a systemd service file.  I guess if someone wanted to change the config from the default (either to another file or to use a directory), they should copy the service file to /etc/systemd/system and override the ExecStart there.

FIXPERMS and AUTORECOVER are also used by some scripts.

MAXFILES can still be removed though, as that's not used by anything but the old init script.  It used it to limit the maximum number of file descriptors, but it doesn't look like systemd supports that particular resource limit (though it supports several others).

I just commited changes for this to SVN, but we'll have to test them in Cauldron after it reopens before considering backporting them.  In the meantime, you can over course override the service file yourself.

CC: (none) => luigiwalser
Whiteboard: (none) => MGA5TOO, MGA4TOO

Comment 4 Marja Van Waes 2017-09-10 22:17:16 CEST
(In reply to David Walser from comment #3)

> I just commited changes for this to SVN, but we'll have to test them in
> Cauldron after it reopens before considering backporting them.  In the
> meantime, you can over course override the service file yourself.

Assuming this is fixed in at least Cauldron and Mageia 6.

It would still be nice if Liutauras could confirm that it got fixed!

CC: (none) => marja11
Version: Cauldron => 5
Whiteboard: MGA5TOO, MGA4TOO => (none)

Comment 5 Marja Van Waes 2018-09-30 18:14:22 CEST
(In reply to Marja Van Waes from comment #4)
> (In reply to David Walser from comment #3)
> 
> > I just commited changes for this to SVN, but we'll have to test them in
> > Cauldron after it reopens before considering backporting them.  In the
> > meantime, you can over course override the service file yourself.
> 
> Assuming this is fixed in at least Cauldron and Mageia 6.
> 
> It would still be nice if Liutauras could confirm that it got fixed!

No reply from Liutauras, closing as OLD (also because Mageia 5 is no longer supported).

@ Liutauras

==> If you didn't reset your password after February 2018, then you'll need to reset it here https://identity.mageia.org/forgot_password to be able to log in and comment in this report. <==

Status: NEW => RESOLVED
Resolution: (none) => OLD


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