Frank Lichtenheld wrote:
On Mon, Jul 05, 2004 at 09:05:42PM -0400, Dan Weber wrote:I read that in the Debian Policy that I must consult debian-devel before using pre-dependencies. The package siproxd uses an adduser pre-dependency to create a user for its daemon and chroot actions. I have already read and understand the consequences of using pre-depend as shown in the previous case http://lists.debian.org/debian-devel/2003/10/msg01243.htmlSorry, but I don't understand from your post what actions of your package require a pre-depends on adduser. Could you show as a preinst you will use or explain in further detail what you plan? Gruesse,
heh sorry, I haven't slept in the last thiry-six hours. For security reasons it drops permissions and needs a user to drop to. The packaging by default now even uses a chroot jail. It also needs the user for the chroot jail and to create the pid file after dropping permissions. Below is the postinst.
#!/bin/sh
case "$1" in
configure)
if ! getent passwd siproxd > /dev/null ; then
echo 'Adding system-user for siproxd' 1>&2
adduser --system --group --home /var/run/siproxd
--no-create-home \
--disabled-login --force-badname siproxd > /dev/null
fi
if dpkg --compare-versions "$2" ge "0.55.snap040427-1"; then
rm -rf /var/lib/siproxd /var/run/siproxd
chown root.siproxd /etc/siproxd.conf /etc/siproxd_passwd.cfg
chmod 640 /etc/siproxd_passwd.cfg
fi
;;
esac
# Create directories for log etc
# install also fixes permissions.
# Bad naming f0llowing the exim4 example ;)
install -d -o siproxd -g siproxd -m755 /var/lib/siproxd/var/run/siproxd
ln -sf /var/lib/siproxd/var/run/siproxd /var/run
chown siproxd.siproxd /var/run/siproxd
all of it can be found here
http://archive.mirrorlynx.com/pool/main/s/siproxd/
Attachment:
signature.asc
Description: OpenPGP digital signature