summaryrefslogtreecommitdiff
path: root/mail/dovecot-devel/pkg-install
diff options
context:
space:
mode:
authorDaichi GOTO <daichi@FreeBSD.org>2003-06-30 14:06:35 +0000
committerDaichi GOTO <daichi@FreeBSD.org>2003-06-30 14:06:35 +0000
commit23b1777850d1311d606eaea323eb2717bb76a27d (patch)
treed665253e0839ce5adfe57165fada534e97792017 /mail/dovecot-devel/pkg-install
parentAdd xmlcatmgr 0.2, SGML/XML catalog manager. (diff)
mail/dovecot 0.99.10
o Synchronise README.FreeBSD with current reality. o Improve security a little by adding a 'dovecot-auth' user and group. PR: 53875 Submitted by: Dominic Marks <dominic.marks@btinternet.com> (maintainer)
Notes
Notes: svn path=/head/; revision=83900
Diffstat (limited to 'mail/dovecot-devel/pkg-install')
-rw-r--r--mail/dovecot-devel/pkg-install32
1 files changed, 31 insertions, 1 deletions
diff --git a/mail/dovecot-devel/pkg-install b/mail/dovecot-devel/pkg-install
index fb261c272e6a..dbb68998b884 100644
--- a/mail/dovecot-devel/pkg-install
+++ b/mail/dovecot-devel/pkg-install
@@ -52,7 +52,7 @@ if [ x"$2" = xPRE-INSTALL ]; then
fi
fi
- if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
+ if /usr/sbin/pw usershow "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
else
if /usr/sbin/pw useradd ${USER} -g ${GROUP} -h - \
@@ -67,4 +67,34 @@ if [ x"$2" = xPRE-INSTALL ]; then
fi
fi
+ USER=dovecot-auth
+ GROUP=dovecot-auth
+
+ if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+ else
+ if /usr/sbin/pw groupadd ${GROUP} -h -
+ then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw usershow "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ else
+ if /usr/sbin/pw useradd ${USER} -g ${GROUP} -h - \
+ -s /sbin/nologin \
+ -c "Dovecot Auth"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
fi