[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: [PATCH] SCM_CREDS support 2(2)
From: |
Svante Signell |
Subject: |
Re: RFC: [PATCH] SCM_CREDS support 2(2) |
Date: |
Tue, 15 Oct 2013 11:44:41 +0200 |
Updated second patch, reflecting recent changes in the first patch.
On Tue, 2013-10-15 at 10:36 +0200, Svante Signell wrote:
> Hi,
>
> Patch 2(2) on SCM_CREDS support for GNU/Hurd.
>
> This patch is optional. kFreeBSD dos not support this case (but Linux
> is).
>
> This patch implements the last cases in the test code sent to the list
> in September 2013, options <-n> and <-z> see
> http://lists.debian.org/debian-hurd/2013/09/msg00034.html
>
> Options:
> no flag:
> -z: send a zero credentials byte as data (used by dbus)
> -n: don't create explicit credentials structure
>
> 1) Sent credentials and PID are correct:
> ./scm_cred_recv &
> ./scm_cred_send -n
> Linux: OK, only sent ids
> kFreeBSD: nOK; ERROR: bad cmsg header cmhp == NULL, data: OK
> Hurd: same as kFreeBSD
>
> ./scm_cred_recv -z&
> ./scm_cred_send -nz
> Linux: OK, same as above
> kFreeBSD: nOK; ERROR: bad cmsg header cmhp == NULL, data: OK
> Hurd: OK, sent IDs + groups
>
> 2) When no credentials structure is sent the behaviour is different:
> Linux:
> -n: received credentials are created
> -zn: received credentials ones are created
>
> kFreeBSD:
> -n: ERROR: bad cmsg header cmhp == NULL
> -zn: ERROR: bad cmsg header cmhp == NULL
>
> Hurd:
> -n: ERROR: bad cmsg header cmhp == NULL
> -zn: received credentials are created
>
scm_creds-sendmsg.c_2.diff
Description: Text Data