Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 900e0143 authored by Patrick Caulfield's avatar Patrick Caulfield Committed by Arnaldo Carvalho de Melo
Browse files

[DECNET]: Remove some redundant ifdeffed code

parent 5ed688a7
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -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)) {