Skip to content

Commit

Permalink
[DECNET]: Remove some redundant ifdeffed code
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: Steven Whitehouse <steve@chygwyn.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
  • Loading branch information
Patrick Caulfield authored and Arnaldo Carvalho de Melo committed Oct 26, 2005
1 parent 5ed688a commit 900e014
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions net/decnet/af_decnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,22 +719,9 @@ static int dn_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
if (saddr->sdn_flags & ~SDF_WILD)
return -EINVAL;

#if 1
if (!capable(CAP_NET_BIND_SERVICE) && (saddr->sdn_objnum ||
(saddr->sdn_flags & SDF_WILD)))
return -EACCES;
#else
/*
* Maybe put the default actions in the default security ops for
* dn_prot_sock ? Would be nice if the capable call would go there
* too.
*/
if (security_dn_prot_sock(saddr) &&
!capable(CAP_NET_BIND_SERVICE) ||
saddr->sdn_objnum || (saddr->sdn_flags & SDF_WILD))
return -EACCES;
#endif


if (!(saddr->sdn_flags & SDF_WILD)) {
if (dn_ntohs(saddr->sdn_nodeaddrl)) {
Expand Down

0 comments on commit 900e014

Please sign in to comment.