chiark / gitweb /
distorted-keys.userv: Add userv configuration snippet.
[distorted-keys] / distorted-keys.userv.in
diff --git a/distorted-keys.userv.in b/distorted-keys.userv.in
new file mode 100644 (file)
index 0000000..4882d5c
--- /dev/null
@@ -0,0 +1,45 @@
+### -*-conf-*-
+###
+### userv services configuration for distorted-keys
+
+###--------------------------------------------------------------------------
+### User crypto operations.
+
+if ( glob service cryptop
+   & glob service-user @user@
+   & grep calling-user-shell /etc/shells
+   )
+       no-suppress-args
+       require-fd 0 read
+       require-fd 1-2 write
+       ignore-fd 3-
+       no-set-environment
+       execute @sbindir@/cryptop
+fi
+
+###--------------------------------------------------------------------------
+### User profile access.
+
+if ( glob service cryptop-profile
+   & grep service-user-shell /etc/shells
+   & glob calling-user @user@
+   )
+       no-suppress-args
+       null-fd 0
+       require-fd 1-2 write
+       ignore-fd 3-
+       no-set-environment
+       execute sh -c "case $# in \
+         1) \
+           exec @bindir@/extract-profile \"$1\" \
+               @pkgconfdir@/profile.d/ \
+               .userv/cryptop-profile \
+           ;; \
+         *) \
+           echo >&2 \"usage: cryptop-profile PROFILE\"; \
+           exit 1 \
+           ;; \
+       esac" _
+fi
+
+###----- That's all, folks --------------------------------------------------