1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
5 #include "user-record.h"
7 typedef struct GroupRecord
{
14 char *group_name_and_realm_auto
;
18 UserDisposition disposition
;
19 uint64_t last_change_usec
;
27 /* The following exist mostly so that we can cover the full /etc/gshadow set of fields, we currently
28 * do not actually make use of these */
29 char **administrators
; /* maps to 'struct sgrp' .sg_adm field */
30 char **hashed_password
; /* maps to 'struct sgrp' .sg_passwd field */
35 GroupRecord
* group_record_new(void);
36 GroupRecord
* group_record_ref(GroupRecord
*g
);
37 GroupRecord
* group_record_unref(GroupRecord
*g
);
39 DEFINE_TRIVIAL_CLEANUP_FUNC(GroupRecord
*, group_record_unref
);
41 int group_record_load(GroupRecord
*h
, JsonVariant
*v
, UserRecordLoadFlags flags
);
42 int group_record_build(GroupRecord
**ret
, ...);
43 int group_record_clone(GroupRecord
*g
, UserRecordLoadFlags flags
, GroupRecord
**ret
);
45 const char *group_record_group_name_and_realm(GroupRecord
*h
);
46 UserDisposition
group_record_disposition(GroupRecord
*h
);