1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
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)
10 /* Flags supported by CreateHomeEx() */
11 #define SD_HOMED_CREATE_FLAGS_ALL (0)
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)
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
20 #define USER_DISK_SIZE_DEFAULT_PERCENT ((unsigned) ((100 * REBALANCE_WEIGHT_DEFAULT) / (REBALANCE_WEIGHT_DEFAULT + REBALANCE_WEIGHT_BACKING)))
22 extern const struct hash_ops blob_fd_hash_ops
;
24 bool suitable_user_name(const char *name
);
25 int suitable_realm(const char *realm
);
26 int suitable_image_path(const char *path
);
28 bool supported_fstype(const char *fstype
);
30 int split_user_name_realm(const char *t
, char **ret_user_name
, char **ret_realm
);
32 int bus_message_append_secret(sd_bus_message
*m
, UserRecord
*secret
);
34 /* Many of our operations might be slow due to crypto, fsck, recursive chown() and so on. For these
35 * operations permit a *very* long timeout */
36 #define HOME_SLOW_BUS_CALL_TIMEOUT_USEC (2*USEC_PER_MINUTE)
38 const char* home_record_dir(void);
39 const char* home_system_blob_dir(void);