Add PIE compilation flags
[platform/upstream/keyutils.git] / request-key-debug.sh
1 #!/bin/sh
2 ###############################################################################
3 #
4 # Copyright (C) 2005 Red Hat, Inc. All Rights Reserved.
5 # Written by David Howells (dhowells@redhat.com)
6 #
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License
9 # as published by the Free Software Foundation; either version
10 # 2 of the License, or (at your option) any later version.
11 #
12 ###############################################################################
13 #
14 # Request key debugging
15 #
16 # Call: request-key-debug.sh <keyid> <desc> <callout> <session-keyring>
17 #
18
19 echo RQDebug keyid: $1
20 echo RQDebug desc: $2
21 echo RQDebug callout: $3
22 echo RQDebug session keyring: $4
23
24 if [ "$3" != "neg" ]
25 then
26     keyctl instantiate $1 "Debug $3" $4 || exit 1
27 else
28     cat /proc/keys
29     echo keyctl negate $1 30 $4
30     keyctl negate $1 30 $4
31 fi
32
33 exit 0