add iodine user and rund daemon in chroot
authorgregor herrmann <gregoa@debian.org>
Sat, 23 Jun 2007 12:47:33 +0000 (12:47 -0000)
committergregor herrmann <gregoa@debian.org>
Sat, 23 Jun 2007 12:47:33 +0000 (12:47 -0000)
debian/iodine.iodined.init
debian/postinst

index c1f19a2d45400963511ba819559f1465b7ac740c..0fb39ddad85bd2fc1139e2f9f12521229ef77f2a 100644 (file)
@@ -44,7 +44,7 @@ get_config() {
                exit 0
        else
                if [ -n "$IODINED_ARGS" ] && [ -n "$IODINED_PASSWORD" ] ; then
-                       DAEMON_ARGS="-P $IODINED_PASSWORD $IODINED_ARGS"
+                       DAEMON_ARGS="-u iodine -t /var/run/iodine -P $IODINED_PASSWORD $IODINED_ARGS"
                else
                        log_warning_msg "$NAME is not fully configured. Change this in /etc/default/$DEFAULT or run dpkg-reconfigure $DEFAULT."
                        exit 0
index d04bbdb49f6b2d2a949f63d3167d1a24f1fbd2c9..41b1e8cfc85d52c22d4bb799401140c625cd37ba 100644 (file)
@@ -27,6 +27,8 @@ case "$1" in
                echo "Creating device /dev/net/tun ..."
                cd /dev && WRITE_ON_UDEV=false ./MAKEDEV tun
            fi
+           # and we want a special user
+           adduser --quiet --system --home /var/run/iodine iodine
       # generate /etc/default/iodine
       db_get iodine/start_daemon
       START_IODINED=$RET