diff options
Diffstat (limited to 'src/shared/user-record.h')
-rw-r--r-- | src/shared/user-record.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/shared/user-record.h b/src/shared/user-record.h index d3decdb5c1..fc8510c074 100644 --- a/src/shared/user-record.h +++ b/src/shared/user-record.h @@ -230,6 +230,19 @@ typedef enum AutoResizeMode { #define REBALANCE_WEIGHT_MAX UINT64_C(10000) #define REBALANCE_WEIGHT_UNSET UINT64_MAX +typedef struct TmpfsLimit { + /* Absolute and relative tmpfs limits */ + uint64_t limit; + uint32_t limit_scale; + bool is_set; +} TmpfsLimit; + +#define TMPFS_LIMIT_NULL \ + (TmpfsLimit) { \ + .limit = UINT64_MAX, \ + .limit_scale = UINT32_MAX, \ + } \ + typedef struct UserRecord { /* The following three fields are not part of the JSON record */ unsigned n_ref; @@ -239,6 +252,7 @@ typedef struct UserRecord { char *user_name; char *realm; char *user_name_and_realm_auto; /* the user_name field concatenated with '@' and the realm, if the latter is defined */ + char **aliases; char *real_name; char *email_address; char *password_hint; @@ -388,6 +402,8 @@ typedef struct UserRecord { char **self_modifiable_blobs; char **self_modifiable_privileged; + TmpfsLimit tmp_limit, dev_shm_limit; + sd_json_variant *json; } UserRecord; @@ -435,6 +451,8 @@ uint64_t user_record_rebalance_weight(UserRecord *h); uint64_t user_record_capability_bounding_set(UserRecord *h); uint64_t user_record_capability_ambient_set(UserRecord *h); int user_record_languages(UserRecord *h, char ***ret); +uint32_t user_record_tmp_limit_scale(UserRecord *h); +uint32_t user_record_dev_shm_limit_scale(UserRecord *h); const char **user_record_self_modifiable_fields(UserRecord *h); const char **user_record_self_modifiable_blobs(UserRecord *h); @@ -490,6 +508,8 @@ typedef struct UserDBMatch { bool user_name_fuzzy_match(const char *names[], size_t n_names, char **matches); int user_record_match(UserRecord *u, const UserDBMatch *match); +bool user_record_matches_user_name(const UserRecord *u, const char *username); + const char* user_storage_to_string(UserStorage t) _const_; UserStorage user_storage_from_string(const char *s) _pure_; |