]> err.no Git - linux-2.6/commitdiff
[DECNET]: Remove some redundant ifdeffed code
authorPatrick Caulfield <patrick@tykepenguin.com>
Tue, 11 Oct 2005 07:22:33 +0000 (08:22 +0100)
committerArnaldo Carvalho de Melo <acme@mandriva.com>
Wed, 26 Oct 2005 01:49:29 +0000 (23:49 -0200)
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>
net/decnet/af_decnet.c

index 1186dc44cdff2ad8d459167e16e6103cec017a24..3f25cadccddd4f048cdbf36d2fa5e92a8a176116 100644 (file)
@@ -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)) {