]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/home/home-util.h
man/systemd-sysext: list ephemeral/ephemeral-import in the list of options
[thirdparty/systemd.git] / src / home / home-util.h
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
70a5db58
LP
2#pragma once
3
572c1fe6 4#include "forward.h"
70a5db58 5
d94c7eef
AV
6/* Flags supported by UpdateEx() */
7#define SD_HOMED_UPDATE_OFFLINE (UINT64_C(1) << 0)
8#define SD_HOMED_UPDATE_FLAGS_ALL (SD_HOMED_UPDATE_OFFLINE)
9
10/* Flags supported by CreateHomeEx() */
11#define SD_HOMED_CREATE_FLAGS_ALL (0)
12
71bf7ba1
LP
13/* Put some limits on disk sizes: not less than 5M, not more than 5T */
14#define USER_DISK_SIZE_MIN (UINT64_C(5)*1024*1024)
15#define USER_DISK_SIZE_MAX (UINT64_C(5)*1024*1024*1024*1024)
16
d357b80d
LP
17/* The default disk size to use when nothing else is specified, relative to free disk space. We calculate
18 * this from the default rebalancing weights, so that what we create initially doesn't immediately require
19 * rebalancing. */
20#define USER_DISK_SIZE_DEFAULT_PERCENT ((unsigned) ((100 * REBALANCE_WEIGHT_DEFAULT) / (REBALANCE_WEIGHT_DEFAULT + REBALANCE_WEIGHT_BACKING)))
21
a4d72746
AV
22extern const struct hash_ops blob_fd_hash_ops;
23
70a5db58
LP
24bool suitable_user_name(const char *name);
25int suitable_realm(const char *realm);
26int suitable_image_path(const char *path);
27
c07bf7a4
LP
28bool supported_fstype(const char *fstype);
29
70a5db58
LP
30int split_user_name_realm(const char *t, char **ret_user_name, char **ret_realm);
31
32int bus_message_append_secret(sd_bus_message *m, UserRecord *secret);
33
34/* Many of our operations might be slow due to crypto, fsck, recursive chown() and so on. For these
201632e3 35 * operations permit a *very* long timeout */
70a5db58 36#define HOME_SLOW_BUS_CALL_TIMEOUT_USEC (2*USEC_PER_MINUTE)
005daeed 37
bfd5a068
ZJS
38const char* home_record_dir(void);
39const char* home_system_blob_dir(void);