diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2016-09-29 15:56:35 +0300 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2016-10-03 12:03:03 +0000 |
commit | 7211bdb982e588f0d9622784ec84a3e9fa06fdd6 (patch) | |
tree | b6a8d8c33508f4d7073ae836cee851777238f5e6 | |
parent | 6fdb10455a7215f736a7dc1fc424376d4159a18b (diff) | |
download | strace-7211bdb982e588f0d9622784ec84a3e9fa06fdd6.tar.gz |
keyctl: print errno name in KEYCTL_REJECT in case it is available
* keyctl.c (keyctl_reject_key): Get errno string via err_name
and print it if it is not NULL.
-rw-r--r-- | keyctl.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -175,8 +175,16 @@ static void keyctl_reject_key(struct tcb *tcp, key_serial_t id1, unsigned timeout, unsigned error, key_serial_t id2) { + const char *err_str = err_name(error); + print_keyring_serial_number(id1); - tprintf(", %u, %u, ", timeout, error); + tprintf(", %u, ", timeout); + + if (err_str) + tprintf("%s, ", err_str); + else + tprintf("%u, ", error); + print_keyring_serial_number(id2); } |