4 |
- |
1 |
###############################################################################
|
|
|
2 |
#
|
|
|
3 |
# Copyright (C) 2005 Red Hat, Inc. All Rights Reserved.
|
|
|
4 |
# Written by David Howells (dhowells@redhat.com)
|
|
|
5 |
#
|
|
|
6 |
# This program is free software; you can redistribute it and/or
|
|
|
7 |
# modify it under the terms of the GNU General Public License
|
|
|
8 |
# as published by the Free Software Foundation; either version
|
|
|
9 |
# 2 of the License, or (at your option) any later version.
|
|
|
10 |
#
|
|
|
11 |
###############################################################################
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
###############################################################################
|
|
|
15 |
#
|
|
|
16 |
# We can run programs or scripts
|
|
|
17 |
# - Macro substitutions in arguments:
|
|
|
18 |
# %%... %...
|
|
|
19 |
# %o operation name
|
|
|
20 |
# %k ID of key being operated upon
|
|
|
21 |
# %t type of key being operated upon
|
|
|
22 |
# %d description of key being operated upon
|
|
|
23 |
# %c callout info
|
|
|
24 |
# %u UID of requestor
|
|
|
25 |
# %g GID of requestor
|
|
|
26 |
# %T thread keyring of requestor (may be 0)
|
|
|
27 |
# %P process keyring of requestor (may be 0)
|
|
|
28 |
# %S session keyring of requestor (may be the user's default session)
|
|
|
29 |
#
|
|
|
30 |
################################################################################
|
|
|
31 |
|
|
|
32 |
#OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ...
|
|
|
33 |
#====== ======= =============== =============== ===============================
|
|
|
34 |
create user debug:* negate /bin/keyctl negate %k 30 %S
|
|
|
35 |
create user debug:loop:* * |/bin/cat
|
|
|
36 |
create user debug:* * /usr/share/keyutils/request-key-debug.sh %k %d %c %S
|
|
|
37 |
negate * * * /bin/keyctl negate %k 30 %S
|