diff options
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: misc.c,v 1.105 2016/07/15 00:24:30 djm Exp $ */ | 1 | /* $OpenBSD: misc.c,v 1.106 2016/10/23 22:04:05 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. |
@@ -1243,3 +1243,11 @@ forward_equals(const struct Forward *a, const struct Forward *b) | |||
1243 | return 1; | 1243 | return 1; |
1244 | } | 1244 | } |
1245 | 1245 | ||
1246 | /* returns 1 if bind to specified port by specified user is permitted */ | ||
1247 | int | ||
1248 | bind_permitted(int port, uid_t uid) | ||
1249 | { | ||
1250 | if (port < IPPORT_RESERVED && uid != 0) | ||
1251 | return 0; | ||
1252 | return 1; | ||
1253 | } | ||