| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "shared-forward.h" |
| 5 |
|
| 6 |
typedef enum PathSimplifyWarnFlags { |
| 7 |
PATH_CHECK_FATAL = 1 << 0, /* If not set, then error message is appended with 'ignoring'. */ |
| 8 |
PATH_CHECK_ABSOLUTE = 1 << 1, |
| 9 |
PATH_CHECK_RELATIVE = 1 << 2, |
| 10 |
PATH_KEEP_TRAILING_SLASH = 1 << 3, |
| 11 |
PATH_CHECK_NON_API_VFS = 1 << 4, |
| 12 |
PATH_CHECK_NON_API_VFS_DEV_OK = 1 << 5, |
| 13 |
} PathSimplifyWarnFlags; |
| 14 |
|
| 15 |
int path_simplify_and_warn( |
| 16 |
char *path, |
| 17 |
PathSimplifyWarnFlags flags, |
| 18 |
const char *unit, |
| 19 |
const char *filename, |
| 20 |
unsigned line, |
| 21 |
const char *lvalue); |
| 22 |
|
| 23 |
int parse_address_families(const char *rvalue, Set **families, bool *is_allowlist); |
| 24 |
|
| 25 |
int parse_socket_bind_item( |
| 26 |
const char *str, |
| 27 |
int *address_family, |
| 28 |
int *ip_protocol, |
| 29 |
uint16_t *nr_ports, |
| 30 |
uint16_t *port_min); |
| 31 |
|
| 32 |
int config_parse_path_or_ignore( |
| 33 |
const char *unit, |
| 34 |
const char *filename, |
| 35 |
unsigned line, |
| 36 |
const char *section, |
| 37 |
unsigned section_line, |
| 38 |
const char *lvalue, |
| 39 |
int ltype, |
| 40 |
const char *rvalue, |
| 41 |
void *data, |
| 42 |
void *userdata); |