claim-dir, debian/distorted-keys.postinst: Let `keys' run `claim-dir'.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 23 Feb 2012 03:03:09 +0000 (03:03 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 23 Feb 2012 03:16:00 +0000 (03:16 +0000)
Unfortunately, `keys' as created by the `postinst' script doesn't have a
shell.  Allow callers without shells to run `claim-dir' if they have a
particular magical shell configured, and set this magic on the `keys'
user.

debian/distorted-keys.postinst
userv/claim-dir.in

index 99a1809..36b7237 100755 (executable)
@@ -8,7 +8,7 @@ home=/var/lib/distorted-keys
 ## Make sure the user exists.
 if ! grep -q ^$user: /etc/passwd; then
   adduser --quiet --system --group \
-    --disabled-password --shell /bin/false \
+    --disabled-password --shell /dev/token-shells/userv \
     --no-create-home --home $home \
     $user
 fi
index 4cc6032..d5f14db 100644 (file)
@@ -4,7 +4,9 @@
 
 if ( glob service claim-dir
    & glob service-user root
-   & grep calling-user-shell /etc/shells
+   & ( grep calling-user-shell /etc/shells
+     | glob calling-user-shell /dev/token-shells/userv
+     )
    )
        no-suppress-args
        null-fd 0