Systemd/src/shared/user-record-nss.h
Lennart Poettering 9b2d907877 shared: add helpers for converting NSS passwd/group structures to new JSON objects
These new calls may be used to convert classic UNIX/glibc NSS struct
passwd and struct group records into new-style JSON-based user/group
objects.
2020-01-15 15:27:23 +01:00

16 lines
488 B
C

/* 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);