bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: Test code for SCM_CREDS


From: Svante Signell
Subject: Re: RFC: Test code for SCM_CREDS
Date: Sat, 07 Sep 2013 22:41:25 +0200

ping

On Wed, 2013-08-28 at 11:18 +0200, Svante Signell wrote:
> Hi,
> 
> attached is a test program for SCM_CREDS support for GNU/Linux,
> GNU/kFreeBSD and GNU/Hurd. With the soon to be submitted patches Hurd
> works as given below. LD_PRELOAD is used for the Hurd tests.
> 
> Options: 
> none: send an integer as data
> -z: send a zero credentials byte as data (used by dbus)
> -n: don't create explicit credentials structure
> -nz, -zn: combine the two options above
> 
> 1) Sent credentials are correct:
> ./scm_cred_recv &
> ./scm_cred_send
> Linux: OK, only sent ids
> kFreeBSD: OK, sent ids + groups
> Hurd: OK, only sent ids
> 
> ./scm_cred_recv -z&
> ./scm_cred_send -z
> Linux: OK, same as above
> kFreeBSD: OK, same as above
> Hurd: OK, sent IDs + groups
> 
> ./scm_cred_recv &
> ./scm_cred_send -n
> Linux: OK, same as above
> 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 wrong credentials are sent the behaviour is different:
> 
> Linux:
> no flag: ERROR [EPERM Operation not permitted] sendmsg
> -z: ERROR [EPERM Operation not permitted] sendmsg
> -n: sent credentials are not honoured, received ones are created
> -zn: sent credentials are not honoured, received ones are created
> 
> kFreeBSD: 
> no flag: sent credentials are not honoured, received ones are created
> -n: ERROR: bad cmsg header cmhp == NULL
> -z: sent credentials are not honoured, received ones are created
> -zn: ERROR: bad cmsg header cmhp == NULL
> 
> Hurd:
> no flag: ERROR [EPERM Operation not permitted] sendmsg
> -z: sent credentials are not honoured, received ones are created
> -n: ERROR: bad cmsg header cmhp == NULL
> -zn: sent credentials are not honoured, received ones are created
> 
> Is the implemented behaviour OK, anything to add/change/remove?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]