don't create homedir in RPM

based on..

From: Charlie Brady <charlieb-qpsmtpd@budge.apana.org.au>
Subject: rpm packaging bug - smtpd user created with shell not /bin/false
Date: Sat, 17 Jul 2010 18:17:49 -0400 (EDT)
Message-ID:
 <Pine.LNX.4.64.1007171816230.19928@e-smith.charlieb.ott.istop.com>

http://bugs.contribs.org/show_bug.cgi?id=6025

if ! id smtpd >/dev/null 2>&1
then
    # need to create smtpd user.
    if perl -e 'exit ! defined(getgrnam("postdrop"))'
    then
    # if postfix is installed, we will probably use
    # queue/postfix, which will need this:
        supp="-G postdrop"
    fi
    useradd -r -m $supp smtpd
fi

qpsmtpd needs a user "smtpd", but should not create a home directory or
give access to a shell.
This commit is contained in:
Robert 2010-07-25 21:48:26 -07:00
parent 803a320127
commit 9348539ed7

View File

@ -153,7 +153,7 @@ then
# queue/postfix, which will need this:
supp="-G postdrop"
fi
useradd -r -m $supp smtpd
useradd -r -M -s /bin/false $supp smtpd
fi
%changelog