diff options
author | daichi <daichi@FreeBSD.org> | 2003-06-30 22:06:35 +0800 |
---|---|---|
committer | daichi <daichi@FreeBSD.org> | 2003-06-30 22:06:35 +0800 |
commit | aad486fc83a01f2f0d0c019bb9a390017afdedcc (patch) | |
tree | 54f44cd7280ca2beba63706351db3ce99efc87b9 /mail/dovecot-devel/pkg-install | |
parent | efc6192abeeb741f1f496e44d08812c199e374d4 (diff) | |
download | freebsd-ports-gnome-aad486fc83a01f2f0d0c019bb9a390017afdedcc.tar.gz freebsd-ports-gnome-aad486fc83a01f2f0d0c019bb9a390017afdedcc.tar.zst freebsd-ports-gnome-aad486fc83a01f2f0d0c019bb9a390017afdedcc.zip |
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)
Diffstat (limited to 'mail/dovecot-devel/pkg-install')
-rw-r--r-- | mail/dovecot-devel/pkg-install | 32 |
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 |