Browse Source

[TIPC]: Fixed privilege checking typo in dest_name_check().

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>
Allan Stephens 19 years ago
parent
commit
70cb234770
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/tipc/socket.c

+ 1 - 1
net/tipc/socket.c

@@ -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)))
         if (copy_from_user(&hdr, m->msg_iov[0].iov_base, sizeof(hdr)))
 		return -EFAULT;
 		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 -EACCES;
         
         
 	return 0;
 	return 0;