summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2018-07-27 05:13:02 +0000
committerDamien Miller <djm@mindrot.org>2018-07-31 12:18:49 +1000
commit73ddb25bae4c33a0db361ac13f2e3a60d7c6c4a5 (patch)
tree9e0b4b1f0866800e6ff6ce1d66f1b97631c13414 /misc.c
parentc12033e102760d043bc5c98e6c8180e4d331b0df (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 'misc.c')
-rw-r--r--misc.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/misc.c b/misc.c
index 6b093f21b..ae4d29b84 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.130 2018/07/18 11:34:04 dtucker Exp $ */ 1/* $OpenBSD: misc.c,v 1.131 2018/07/27 05:13:02 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved. 4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -1576,15 +1576,6 @@ forward_equals(const struct Forward *a, const struct Forward *b)
1576 return 1; 1576 return 1;
1577} 1577}
1578 1578
1579/* returns 1 if bind to specified port by specified user is permitted */
1580int
1581bind_permitted(int port, uid_t uid)
1582{
1583 if (port < IPPORT_RESERVED && uid != 0)
1584 return 0;
1585 return 1;
1586}
1587
1588/* returns 1 if process is already daemonized, 0 otherwise */ 1579/* returns 1 if process is already daemonized, 0 otherwise */
1589int 1580int
1590daemonized(void) 1581daemonized(void)