Skip to content

Commit

Permalink
[TIPC]: Fixed privilege checking typo in dest_name_check().
Browse files Browse the repository at this point in the history
This patch originated by Stephane Ouellette <ouellettes@videotron.ca>.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Allan Stephens authored and David S. Miller committed Jun 26, 2006
1 parent 3ac9021 commit 70cb234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ static int dest_name_check(struct sockaddr_tipc *dest, struct msghdr *m)

if (copy_from_user(&hdr, m->msg_iov[0].iov_base, sizeof(hdr)))
return -EFAULT;
if ((ntohs(hdr.tcm_type) & 0xC000) & (!capable(CAP_NET_ADMIN)))
if ((ntohs(hdr.tcm_type) & 0xC000) && (!capable(CAP_NET_ADMIN)))
return -EACCES;

return 0;
Expand Down

0 comments on commit 70cb234

Please sign in to comment.