diff options
| author | Roland Dreier <rolandd@cisco.com> | 2005-10-28 18:50:51 -0400 |
|---|---|---|
| committer | Roland Dreier <rolandd@cisco.com> | 2005-10-28 18:50:51 -0400 |
| commit | a4da0628efd788eb199dd9df225e296035ec2539 (patch) | |
| tree | 1e611030c993e1480dc2f07f26976d2d33002b0d /net/decnet/af_decnet.c | |
| parent | 70a30e16a8a9d22396a4d1e96af86e43594df584 (diff) | |
| parent | 20731945ae743034353a88c307920d1f16cf8ac8 (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'net/decnet/af_decnet.c')
| -rw-r--r-- | net/decnet/af_decnet.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 1186dc44cdff..3f25cadccddd 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
| @@ -719,22 +719,9 @@ static int dn_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
| 719 | if (saddr->sdn_flags & ~SDF_WILD) | 719 | if (saddr->sdn_flags & ~SDF_WILD) |
| 720 | return -EINVAL; | 720 | return -EINVAL; |
| 721 | 721 | ||
| 722 | #if 1 | ||
| 723 | if (!capable(CAP_NET_BIND_SERVICE) && (saddr->sdn_objnum || | 722 | if (!capable(CAP_NET_BIND_SERVICE) && (saddr->sdn_objnum || |
| 724 | (saddr->sdn_flags & SDF_WILD))) | 723 | (saddr->sdn_flags & SDF_WILD))) |
| 725 | return -EACCES; | 724 | return -EACCES; |
| 726 | #else | ||
| 727 | /* | ||
| 728 | * Maybe put the default actions in the default security ops for | ||
| 729 | * dn_prot_sock ? Would be nice if the capable call would go there | ||
| 730 | * too. | ||
| 731 | */ | ||
| 732 | if (security_dn_prot_sock(saddr) && | ||
| 733 | !capable(CAP_NET_BIND_SERVICE) || | ||
| 734 | saddr->sdn_objnum || (saddr->sdn_flags & SDF_WILD)) | ||
| 735 | return -EACCES; | ||
| 736 | #endif | ||
| 737 | |||
| 738 | 725 | ||
| 739 | if (!(saddr->sdn_flags & SDF_WILD)) { | 726 | if (!(saddr->sdn_flags & SDF_WILD)) { |
| 740 | if (dn_ntohs(saddr->sdn_nodeaddrl)) { | 727 | if (dn_ntohs(saddr->sdn_nodeaddrl)) { |
