chiark / gitweb /
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 99a18090a00e6a077b78db23ffb0eb15e0012ee5..36b7237eef56d5ebbd2f01e00b1ce052a56cf90d 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 4cc6032f43280c51a25cd31756979cf069a844f4..d5f14db3e50114efe8b3ccc4ad70206d593418cb 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