[PATCH] Decode struct ucred for getsockopt() with SO_PEERCRED.

Dmitry V. Levin ldv at altlinux.org
Thu Dec 2 23:59:29 UTC 2010


Hi,

On Wed, Dec 01, 2010 at 02:42:37PM +0100, Arkadiusz Miśkiewicz wrote:
> Decode struct ucred (pid, uid, gid) for getsockopt() with SO_PEERCRED.
[...]
> +					tprintf("{pid=%lu, uid=%lu, gid=%lu}, "
> +						"[%d]",
> +						ucred.pid,
> +						ucred.uid,
> +						ucred.gid,
> +						len);

I think all these integers are rather signed than unsigned.
There is a code in this file already that decodes struct ucred,
it treats all these struct fields as signed integers.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20101203/2d23bd73/attachment.bin>


More information about the Strace-devel mailing list