]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
70a5db58 LP |
2 | #pragma once |
3 | ||
4 | #include <stdbool.h> | |
5 | ||
6 | #include "sd-bus.h" | |
7 | ||
8 | #include "time-util.h" | |
9 | #include "user-record.h" | |
10 | ||
f509ed4b LP |
11 | /* See https://systemd.io/UIDS-GIDS for details how this range fits into the rest of the world */ |
12 | #define HOME_UID_MIN 60001 | |
13 | #define HOME_UID_MAX 60513 | |
14 | ||
71bf7ba1 LP |
15 | /* Put some limits on disk sizes: not less than 5M, not more than 5T */ |
16 | #define USER_DISK_SIZE_MIN (UINT64_C(5)*1024*1024) | |
17 | #define USER_DISK_SIZE_MAX (UINT64_C(5)*1024*1024*1024*1024) | |
18 | ||
19 | /* The default disk size to use when nothing else is specified, relative to free disk space */ | |
20 | #define USER_DISK_SIZE_DEFAULT_PERCENT 85 | |
21 | ||
70a5db58 LP |
22 | bool suitable_user_name(const char *name); |
23 | int suitable_realm(const char *realm); | |
24 | int suitable_image_path(const char *path); | |
25 | ||
c07bf7a4 LP |
26 | bool supported_fstype(const char *fstype); |
27 | ||
70a5db58 LP |
28 | int split_user_name_realm(const char *t, char **ret_user_name, char **ret_realm); |
29 | ||
30 | int bus_message_append_secret(sd_bus_message *m, UserRecord *secret); | |
31 | ||
32 | /* Many of our operations might be slow due to crypto, fsck, recursive chown() and so on. For these | |
201632e3 | 33 | * operations permit a *very* long timeout */ |
70a5db58 | 34 | #define HOME_SLOW_BUS_CALL_TIMEOUT_USEC (2*USEC_PER_MINUTE) |
005daeed LP |
35 | |
36 | const char *home_record_dir(void); |