[apparmor] [PATCH v2 01/11] tests: Exit with error from unix_client if execl() fails

Steve Beattie steve at nxnw.org
Tue Sep 16 08:44:25 UTC 2014


On Mon, Sep 15, 2014 at 02:55:54PM -0500, Tyler Hicks wrote:
> Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
Acked-by: Steve Beattie <steve at nxnw.org>

> ---
>  tests/regression/apparmor/unix_socket.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/regression/apparmor/unix_socket.c b/tests/regression/apparmor/unix_socket.c
> index b6dc0dd..3d86225 100644
> --- a/tests/regression/apparmor/unix_socket.c
> +++ b/tests/regression/apparmor/unix_socket.c
> @@ -159,7 +159,8 @@ int main (int argc, char *argv[])
>  		exit(1);
>  	} else if (!pid) {
>  		execl(argv[4], argv[4], sun_path, argv[2], NULL);
> -		exit(0);
> +		perror("FAIL - execl");
> +		exit(1);
>  	}
>  
>  	pfd.fd = sock;

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140916/741618d2/attachment.pgp>


More information about the AppArmor mailing list