On Mon, Aug 11, 2014 at 03:08:09PM -0500, Tyler Hicks wrote: > Signed-off-by: Tyler Hicks <[email protected]>
Acked-by: Seth Arnold <[email protected]> Thanks > --- > tests/regression/apparmor/unix_socket_file.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tests/regression/apparmor/unix_socket_file.c > b/tests/regression/apparmor/unix_socket_file.c > index a24e84e..76a4eb8 100644 > --- a/tests/regression/apparmor/unix_socket_file.c > +++ b/tests/regression/apparmor/unix_socket_file.c > @@ -116,7 +116,7 @@ int main (int argc, char *argv[]) > } > memcpy(msg_buf, argv[3], msg_buf_len); > > - sock = socket(AF_UNIX, type, 0); > + sock = socket(AF_UNIX, type | SOCK_CLOEXEC, 0); > if (sock == -1) { > perror("FAIL - socket"); > exit(1); > @@ -131,7 +131,7 @@ int main (int argc, char *argv[]) > exit(1); > } > > - if (type == SOCK_STREAM || type == SOCK_SEQPACKET) { > + if (type & SOCK_STREAM || type & SOCK_SEQPACKET) { > rc = listen(sock, 2); > if (rc < 0) { > perror("FAIL - listen"); > @@ -159,7 +159,7 @@ int main (int argc, char *argv[]) > exit(1); > } > > - rc = (type == SOCK_STREAM || type == SOCK_SEQPACKET) ? > + rc = (type & SOCK_STREAM || type & SOCK_SEQPACKET) ? > connection_based_messaging(sock, msg_buf, msg_buf_len) : > connectionless_messaging(sock, msg_buf, msg_buf_len); > if (rc) > -- > 2.1.0.rc1 > > > -- > AppArmor mailing list > [email protected] > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/apparmor >
signature.asc
Description: Digital signature
-- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
