summaryrefslogtreecommitdiff
path: root/src/libs6net/s6net_accessrules_keycheck_reversedns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6net/s6net_accessrules_keycheck_reversedns.c')
-rw-r--r--src/libs6net/s6net_accessrules_keycheck_reversedns.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/libs6net/s6net_accessrules_keycheck_reversedns.c b/src/libs6net/s6net_accessrules_keycheck_reversedns.c
deleted file mode 100644
index f4c0213..0000000
--- a/src/libs6net/s6net_accessrules_keycheck_reversedns.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* ISC license. */
-
-#include <errno.h>
-#include <skalibs/bytestr.h>
-#include <s6-networking/accessrules.h>
-
-s6net_accessrules_result_t s6net_accessrules_keycheck_reversedns (void const *key, void *data, s6net_accessrules_params_t *params, s6net_accessrules_backend_func_t_ref check1)
-{
- char const *name = key ;
- unsigned int len = str_len(name) ;
- if (!len) return (errno = EINVAL, S6NET_ACCESSRULES_ERROR) ;
- if (name[len-1] == '.') len-- ;
- {
- unsigned int i = 0 ;
- char tmp[len + 11] ;
- byte_copy(tmp, 11, "reversedns/") ;
- while (i < len)
- {
- register s6net_accessrules_result_t r ;
- byte_copy(tmp+11, len-i, name+i) ;
- r = (*check1)(tmp, 11+len-i, data, params) ;
- if (r != S6NET_ACCESSRULES_NOTFOUND) return r ;
- i += byte_chr(name+i, len-i, '.') + 1 ;
- }
- }
- return (*check1)("reversedns/@", 12, data, params) ;
-}