]> granicus.if.org Git - strace/commit
Impove struct cmsghdr decoding
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 24 Jan 2015 15:20:31 +0000 (15:20 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 24 Jan 2015 15:54:33 +0000 (15:54 +0000)
commitb85a7f3b9525a3b4cd84f301b2c7b100348242fe
tree483f68df24cc331f9dd2f3949c9d13970d191ece
parent778dfb270f1dcbd872435cb4e362427da8e4f1dc
Impove struct cmsghdr decoding

Print all cmsghdr structures in msg_control array,
not just the first one.
Change output format to be consistent with other parts of strace
where structures and arrays are printed.
Implement decoder for SCM_SECURITY message type.

* net.c (print_scm_rights, print_scm_creds, print_scm_security):
New functions.
(printcmsghdr): Use them.  Iterate over all members of the array.
* xlat/scmvals.in: Add SCM_SECURITY.
* tests/scm_rights.c (main): Pass one more descriptor to the receiver.
Set SO_PASSCRED on the receiver part.  Reserve enough space to receive
SCM_CREDENTIALS and SCM_RIGHTS.
* tests/scm_rights-fd.test: Update.
net.c
tests/scm_rights-fd.test
tests/scm_rights.c
xlat/scmvals.in