distorted-keys.userv: Add userv configuration snippet.
[distorted-keys] / distorted-keys.userv.in
1 ### -*-conf-*-
2 ###
3 ### userv services configuration for distorted-keys
4
5 ###--------------------------------------------------------------------------
6 ### User crypto operations.
7
8 if ( glob service cryptop
9 & glob service-user @user@
10 & grep calling-user-shell /etc/shells
11 )
12 no-suppress-args
13 require-fd 0 read
14 require-fd 1-2 write
15 ignore-fd 3-
16 no-set-environment
17 execute @sbindir@/cryptop
18 fi
19
20 ###--------------------------------------------------------------------------
21 ### User profile access.
22
23 if ( glob service cryptop-profile
24 & grep service-user-shell /etc/shells
25 & glob calling-user @user@
26 )
27 no-suppress-args
28 null-fd 0
29 require-fd 1-2 write
30 ignore-fd 3-
31 no-set-environment
32 execute sh -c "case $# in \
33 1) \
34 exec @bindir@/extract-profile \"$1\" \
35 @pkgconfdir@/profile.d/ \
36 .userv/cryptop-profile \
37 ;; \
38 *) \
39 echo >&2 \"usage: cryptop-profile PROFILE\"; \
40 exit 1 \
41 ;; \
42 esac" _
43 fi
44
45 ###----- That's all, folks --------------------------------------------------