|
From: | shishi-commit |
Subject: | Change --keys. |
Date: | Fri, 12 Dec 2003 17:18:09 +0100 |
Commit from jas | 2003-12-12 00:25 CET |
Change --keys.
Module | File name | Revision | |||
---|---|---|---|---|---|
shishi | src/shisa.c | 1.25 | >>> | 1.26 | |
shishi | src/shisa.ggo | 1.9 | >>> | 1.10 |
shishi/src/shisa.c 1.25 >>> 1.26 |
---|
Line 106 |
if (args_info.dump_given) { |
+ Shisa_key **keys; + size_t nkeys; + size_t i; + |
printfield ("Account is", ph.isdisabled ? "DISABLED" : "enabled"); printuint32field ("Current key version", ph.kvno); if (ph.notusedbefore != (time_t) -1) |
Line 122 |
printtimefield ("Password expire on", ph.passwordexpire); if (ph.accountexpire != (time_t) -1) printtimefield ("Account expire on", ph.accountexpire); |
- } - - if (args_info.keys_given) - { - Shisa_key **keys; - size_t nkeys; - size_t i; |
printf ("\t\tKeys:\n"); |
Line 140 |
if (keys[i]) { printuint32field ("\tEtype", keys[i]->etype); |
- printfield ("\tKey", keys[i]->key); |
+ if (args_info.keys_given) + { + Shishi_key *key; + + rc = shishi_key_from_value (sh, keys[i]->etype, + keys[i]->key, &key); + if (rc == SHISHI_OK) + shishi_key_print (sh, stdout, key); + else + return SHISA_NO_KEY; + } |
printfield ("\tSalt", keys[i]->salt); printfield ("\tS2K params", keys[i]->str2keyparam); |
- printfield ("\tPassword", keys[i]->password); |
+ if (args_info.keys_given) + printfield ("\tPassword", keys[i]->password); |
shisa_key_free (dbh, keys[i]); } else |
shishi/src/shisa.ggo 1.9 >>> 1.10 |
---|
Line 34 |
option "force" f "Allow removal of non-empty realms.\n" flag off option "enabled" - "Only dump or list enabled principals.\n" flag off option "disabled" - "Only dump or list disabled principals.\n" flag off |
- option "keys" - "Dump or list keys as well.\n" flag off |
+ option "keys" - "Print sensitive cryptographic key and password.\n" flag off |
section "Values (for --add and --modify)" option "encryption-type" E "Override default key encryption type. Valid values include 'aes128', 'aes256', 'aes' (same as 'aes256'), '3des', 'des-md5', 'des-md4', 'des-crc', 'des' (same as 'des-md5'), and 'arcfour'." string no |
[Prev in Thread] | Current Thread | [Next in Thread] |