summaryrefslogtreecommitdiff
path: root/src/shared/user-record-nss.h
blob: d5fb23ad2a294f66e3a468be2e08254f959c954b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once

#include <pwd.h>
#include <shadow.h>

#include "user-record.h"

/* Synthesizes a UserRecord object from NSS data */

int nss_passwd_to_user_record(const struct passwd *pwd, const struct spwd *spwd, UserRecord **ret);
int nss_spwd_for_passwd(const struct passwd *pwd, struct spwd *ret_spwd, char **ret_buffer);

int nss_user_record_by_name(const char *name, UserRecord **ret);
int nss_user_record_by_uid(uid_t uid, UserRecord **ret);