]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/userdb-dropin.h
Rename def.h to constants.h
[thirdparty/systemd.git] / src / shared / userdb-dropin.h
CommitLineData
85f088ab
LP
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2#pragma once
3
28db6fbf 4#include "constants.h"
85f088ab
LP
5#include "group-record.h"
6#include "user-record.h"
7#include "userdb.h"
8
9/* This could be put together with CONF_PATHS_NULSTR, with the exception of the /run/host/ part in the
10 * middle, which we use here, but not otherwise. */
11#define USERDB_DROPIN_DIR_NULSTR(n) \
12 "/etc/" n "\0" \
13 "/run/" n "\0" \
14 "/run/host/" n "\0" \
15 "/usr/local/lib/" n "\0" \
16 "/usr/lib/" n "\0" \
17 _CONF_PATHS_SPLIT_USR_NULSTR(n)
18
19int dropin_user_record_by_name(const char *name, const char *path, UserDBFlags flags, UserRecord **ret);
20int dropin_user_record_by_uid(uid_t uid, const char *path, UserDBFlags flags, UserRecord **ret);
21
22int dropin_group_record_by_name(const char *name, const char *path, UserDBFlags flags, GroupRecord **ret);
23int dropin_group_record_by_gid(gid_t gid, const char *path, UserDBFlags flags, GroupRecord **ret);