Otherwise it can be depleted and print_iovec starts printing empty
strings.
* io.c (print_iovec): Interpret c->data_size of -1 as unlimited data and
do not decrease it in this case.
---
io.c |6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/io.c b/io.c
index 907f9d2..
* tests/Makefile.am (DECODER_TESTS): Add add_key.test, keyctl.test,
request_key.test.
(check_PROGRAMS): Add add_key, keyctl, request_key.
* tests/.gitignore: Likewise.
* tests/add_key.c: New file.
* tests/add_key.test: Likewise.
* tests/keyctl.c: Likewise.
* tests/keyctl.test: Likewise.
* tests
* keyctl.c (keyctl_reject_key): Get errno string via err_name and print
it if it is not NULL.
---
keyctl.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/keyctl.c b/keyctl.c
index c9081b7..1fb1da5 100644
--- a/keyctl.c
+++ b/keyctl.c
@@ -175,8 +175,16 @@ static v
* keyctl.c (struct keyctl_dh_params): New structure.
(print_dh_params): New function.
(keyctl_dh_compute): New function.
(SYS_FUNC(keyctl)): Add support for KEYCTL_DH_COMPUTE cmd value.
---
keyctl.c | 46 ++
1 file changed, 46 insertions(+)
diff
Since this command doesn't have any additional arguments, the comma does
not needed. Since this is the only command which lacks additional
arguments, it's better to add special case for it rather than add
printing of comma to all other commands.
* keyctl.c (SYS_FUNC(keyctl)): Add check for command
Otherwise it is erroneous on x32, for example.
* keyctl.c (SYS_FUNC(keyctl)): Use "%#llx" conversion specifier and
getarg_ull for fallback argument printing.
---
keyctl.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/keyctl.c b/keyctl.c
index ecb3e79..a0bbbd0 1006
* syscall.c (err_name): New function.
* defs.h: Add declaration of err_name().
---
defs.h|1 +
syscall.c |9 +
2 files changed, 10 insertions(+)
diff --git a/defs.h b/defs.h
index ffea23f..1e2363b 100644
--- a/defs.h
+++ b/defs.h
@@ -457,6 +457,7 @@ extern void clear_regs(void
UID/GID are unsigned except special -1 value (which is also special in
context of specific keyctl commands), so special printing function
should be used.
* keyctl.c (keyctl_chown_key): Use printuid instead of printf with "%d"
conversion for printing UID/GID.
(keyctl_get_persistent): Likewise.
Hello.
This patchset provides minor updates to decoders in keyctl.c along with
tests for add_key, keyctl, and request_key syscall decoders.
Eugene Syromyatnikov (8):
keyctl: Use printuid for printing UID/GID
keyctl: Use getarg_ull for printing generic arguments
keyctl: Do not print comma fo