From 73ddb25bae4c33a0db361ac13f2e3a60d7c6c4a5 Mon Sep 17 00:00:00 2001 From: "dtucker@openbsd.org" Date: Fri, 27 Jul 2018 05:13:02 +0000 Subject: 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 --- misc.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'misc.c') diff --git a/misc.c b/misc.c index 6b093f21..ae4d29b8 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.130 2018/07/18 11:34:04 dtucker Exp $ */ +/* $OpenBSD: misc.c,v 1.131 2018/07/27 05:13:02 dtucker Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -1576,15 +1576,6 @@ forward_equals(const struct Forward *a, const struct Forward *b) return 1; } -/* returns 1 if bind to specified port by specified user is permitted */ -int -bind_permitted(int port, uid_t uid) -{ - if (port < IPPORT_RESERVED && uid != 0) - return 0; - return 1; -} - /* returns 1 if process is already daemonized, 0 otherwise */ int daemonized(void) -- cgit v1.2.3