aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2013-08-12 14:53:16 +0100
committerDavid Howells <dhowells@redhat.com>2013-08-12 14:53:16 +0100
commit96bae1cc9b062f669ed4ac322807e77e12d1b8fc (patch)
tree9db05ff7dbdd77ab792b8c2f7b6d04a225eaae46
parent823384c85618734d40e4a653dfe049313f332bec (diff)
downloadkeyutils-96bae1cc9b062f669ed4ac322807e77e12d1b8fc.tar.gz
keyctl: Fix max depth of key tree dump
Fix the maximum depth of the key tree dump made my "keyctl show". The depth increases in multiples of four because it is used to determine how many spaces to prefix each printed line with - and not multiples of one. Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--keyctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/keyctl.c b/keyctl.c
index bf239b3..cf89d23 100644
--- a/keyctl.c
+++ b/keyctl.c
@@ -1621,7 +1621,7 @@ static int dump_key_tree_aux(key_serial_t key, int depth, int more, int hex_key_
char *desc, type[255], pretty_mask[9];
int uid, gid, ret, n, dpos, rdepth, kcount = 0;
- if (depth > 8)
+ if (depth > 8 * 4)
return 0;
/* find out how big this key's description is */