]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
8530dc44 LP |
2 | #pragma once |
3 | ||
c1ff5570 | 4 | #include <stdbool.h> |
8530dc44 LP |
5 | #include <sys/types.h> |
6 | ||
7 | typedef struct UidRange { | |
8 | uid_t start, nr; | |
9 | } UidRange; | |
10 | ||
11 | int uid_range_add(UidRange **p, unsigned *n, uid_t start, uid_t nr); | |
12 | int uid_range_add_str(UidRange **p, unsigned *n, const char *s); | |
13 | ||
14 | int uid_range_next_lower(const UidRange *p, unsigned n, uid_t *uid); | |
15 | bool uid_range_contains(const UidRange *p, unsigned n, uid_t uid); |