Debian Codegraph @

src/shared/user-record-nss.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include "shared-forward.h"
5
6 /* Synthesize UserRecord and GroupRecord objects from NSS data */
7
8 int nss_passwd_to_user_record(const struct passwd *pwd, const struct spwd *spwd, UserRecord **ret);
9 int nss_spwd_for_passwd(const struct passwd *pwd, struct spwd *ret_spwd, char **ret_buffer);
10
11 int nss_user_record_by_name(const char *name, bool with_shadow, UserRecord **ret);
12 int nss_user_record_by_uid(uid_t uid, bool with_shadow, UserRecord **ret);
13
14 int nss_group_to_group_record(const struct group *grp, const struct sgrp *sgrp, GroupRecord **ret);
15 int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **ret_buffer);
16
17 int nss_group_record_by_name(const char *name, bool with_shadow, GroupRecord **ret);
18 int nss_group_record_by_gid(gid_t gid, bool with_shadow, GroupRecord **ret);