From fef0a02f50f6573ac84ee4ba3f83d9cd9eb7ae96 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 23 Feb 2012 03:03:09 +0000 Subject: [PATCH] claim-dir, debian/distorted-keys.postinst: Let `keys' run `claim-dir'. 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 | 2 +- userv/claim-dir.in | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/distorted-keys.postinst b/debian/distorted-keys.postinst index 99a1809..36b7237 100755 --- a/debian/distorted-keys.postinst +++ b/debian/distorted-keys.postinst @@ -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 diff --git a/userv/claim-dir.in b/userv/claim-dir.in index 4cc6032..d5f14db 100644 --- a/userv/claim-dir.in +++ b/userv/claim-dir.in @@ -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 -- 2.11.0