Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10743
b: refs/heads/master
c: 64a0c1c
h: refs/heads/master
i:
  10741: 29c1ebd
  10739: 3922525
  10735: b4474c5
v: v3
  • Loading branch information
Ivan Skytte Jorgensen authored and Sridhar Samudrala committed Oct 28, 2005
1 parent 31aa6d7 commit 0178b5e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 96a339985d4c6874d32909e8f1903e6e6c141399
refs/heads/master: 64a0c1c81e300f0f56f26604c81040784e3717f0
26 changes: 26 additions & 0 deletions trunk/net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,19 @@ static int __sctp_connect(struct sock* sk,
err = -EAGAIN;
goto out_free;
}
} else {
/*
* If an unprivileged user inherits a 1-many
* style socket with open associations on a
* privileged port, it MAY be permitted to
* accept new associations, but it SHOULD NOT
* be permitted to open new associations.
*/
if (ep->base.bind_addr.port < PROT_SOCK &&
!capable(CAP_NET_BIND_SERVICE)) {
err = -EACCES;
goto out_free;
}
}

scope = sctp_scope(&to);
Expand Down Expand Up @@ -1515,6 +1528,19 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
err = -EAGAIN;
goto out_unlock;
}
} else {
/*
* If an unprivileged user inherits a one-to-many
* style socket with open associations on a privileged
* port, it MAY be permitted to accept new associations,
* but it SHOULD NOT be permitted to open new
* associations.
*/
if (ep->base.bind_addr.port < PROT_SOCK &&
!capable(CAP_NET_BIND_SERVICE)) {
err = -EACCES;
goto out_unlock;
}
}

scope = sctp_scope(&to);
Expand Down

0 comments on commit 0178b5e

Please sign in to comment.