diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2018-07-27 05:13:02 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-07-31 12:18:49 +1000 |
commit | 73ddb25bae4c33a0db361ac13f2e3a60d7c6c4a5 (patch) | |
tree | 9e0b4b1f0866800e6ff6ce1d66f1b97631c13414 /readconf.c | |
parent | c12033e102760d043bc5c98e6c8180e4d331b0df (diff) |
upstream: Remove uid checks from low port binds. Now that ssh
cannot be setuid and sshd always has privsep on, we can remove the uid checks
for low port binds and just let the system do the check. We leave a sanity
check for the !privsep case so long as the code is stil there. with & ok
djm@
OpenBSD-Commit-ID: 9535cfdbd1cd54486fdbedfaee44ce4367ec7ca0
Diffstat (limited to 'readconf.c')
-rw-r--r-- | readconf.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/readconf.c b/readconf.c index ce832526a..d9b6e4cf9 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readconf.c,v 1.294 2018/07/19 10:28:47 dtucker Exp $ */ | 1 | /* $OpenBSD: readconf.c,v 1.295 2018/07/27 05:13:02 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -323,9 +323,6 @@ add_local_forward(Options *options, const struct Forward *newfwd) | |||
323 | extern uid_t original_real_uid; | 323 | extern uid_t original_real_uid; |
324 | int i; | 324 | int i; |
325 | 325 | ||
326 | if (!bind_permitted(newfwd->listen_port, original_real_uid) && | ||
327 | newfwd->listen_path == NULL) | ||
328 | fatal("Privileged ports can only be forwarded by root."); | ||
329 | /* Don't add duplicates */ | 326 | /* Don't add duplicates */ |
330 | for (i = 0; i < options->num_local_forwards; i++) { | 327 | for (i = 0; i < options->num_local_forwards; i++) { |
331 | if (forward_equals(newfwd, options->local_forwards + i)) | 328 | if (forward_equals(newfwd, options->local_forwards + i)) |