1 |
From 9348539ed7aa03b438905f953771db14fcb4c1ea Mon Sep 17 00:00:00 2001 |
2 |
From: Robert <rspier@pobox.com> |
3 |
Date: Sun, 25 Jul 2010 21:48:26 -0700 |
4 |
Subject: don't create homedir in RPM |
5 |
|
6 |
based on.. |
7 |
|
8 |
From: Charlie Brady <charlieb-qpsmtpd@budge.apana.org.au> |
9 |
Subject: rpm packaging bug - smtpd user created with shell not /bin/false |
10 |
Date: Sat, 17 Jul 2010 18:17:49 -0400 (EDT) |
11 |
Message-ID: |
12 |
<Pine.LNX.4.64.1007171816230.19928@e-smith.charlieb.ott.istop.com> |
13 |
|
14 |
http://bugs.contribs.org/show_bug.cgi?id=6025 |
15 |
|
16 |
if ! id smtpd >/dev/null 2>&1 |
17 |
then |
18 |
# need to create smtpd user. |
19 |
if perl -e 'exit ! defined(getgrnam("postdrop"))' |
20 |
then |
21 |
# if postfix is installed, we will probably use |
22 |
# queue/postfix, which will need this: |
23 |
supp="-G postdrop" |
24 |
fi |
25 |
useradd -r -m $supp smtpd |
26 |
fi |
27 |
|
28 |
qpsmtpd needs a user "smtpd", but should not create a home directory or |
29 |
give access to a shell. |
30 |
--- |
31 |
packaging/rpm/qpsmtpd.spec.in | 2 +- |
32 |
1 files changed, 1 insertions(+), 1 deletions(-) |
33 |
|
34 |
diff --git a/packaging/rpm/qpsmtpd.spec.in b/packaging/rpm/qpsmtpd.spec.in |
35 |
index f591ed6..e7529de 100644 |
36 |
--- a/packaging/rpm/qpsmtpd.spec.in |
37 |
+++ b/packaging/rpm/qpsmtpd.spec.in |
38 |
@@ -153,7 +153,7 @@ then |
39 |
# queue/postfix, which will need this: |
40 |
supp="-G postdrop" |
41 |
fi |
42 |
- useradd -r -m $supp smtpd |
43 |
+ useradd -r -M -s /bin/false $supp smtpd |
44 |
fi |
45 |
|
46 |
%changelog |
47 |
-- |
48 |
1.7.2.2 |
49 |
|