2
* Copyright (C) 2004-2006 International Business Machines
3
* Written by Michael A. Halcrow <mhalcrow@us.ibm.com>
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License as
7
* published by the Free Software Foundation; either version 2 of the
8
* License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23
#include <sys/types.h>
27
void dump_auth_tok(struct ecryptfs_auth_tok *auth_tok);
29
int main( int argc, char **argv )
33
struct ecryptfs_auth_tok auth_tok;
35
printf( "Usage: %s <key id>\n", argv[0]);
38
key_id = atoi(argv[1]);
40
rc = keyctl(KEYCTL_READ, key_id, (char*)&auth_tok,
41
sizeof(struct ecryptfs_auth_tok));
43
printf("Error reading key with id [%d]\n", key_id);
46
printf("Successful read of key id [%d]\n",key_id);
47
dump_auth_tok(&auth_tok);