HomeClusterLabs Projects

Medium: ldirectord: Get correct user for sending email (bnc#910497)

Description

Medium: ldirectord: Get correct user for sending email (bnc#910497)

On sending email alert the "local part" of the sending mailaddress
(before @) is the "user" who start ldirectord.
This however does only work if you start /usr/sbin/ldirectord on a bash
shell.
Starting it via resource agent ocf:heartbeat:ldirectord seems not
forward the bash environment "$ENV{USER}".

/var/log/mail shows like this:
Dec 12 12:30:41 sles11sp301 postfix/qmgr[15049]: 06B94103B9D:
from=<@sles11sp301.vmhamming.suse.de>, size=608, nrcpt=1 (queue active)

The following change (using "getpwuid( $< )" instead) will fix that problem.

Details

Provenance
Thomas Schlosser <thomas.schlosser@suse.com>Authored on Jan 2 2015, 8:36 AM
Kristoffer Grönlund <krig@koru.se>Committed on Jan 2 2015, 8:39 AM
Parents
rR364260a997dc: Merge pull request #523 from dmuhamedagic/xen-quotes
Branches
Unknown
Tags
Unknown

Event Timeline