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