a3451c2c4c
There are two libc APIs for accessing the user database: NSS/getpwuid(), and fgetpwent(). if we run in --root= mode (i.e. "offline" mode), let's use the latter. Otherwise the former. This means tmpfiles can use the database included in the root environment for chowning, which is a lot more appropriate. Fixes: #14806
10 lines
290 B
C
10 lines
290 B
C
/* SPDX-License-Identifier: LGPL-2.1+ */
|
|
#pragma once
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include "hashmap.h"
|
|
|
|
int name_to_uid_offline(const char *root, const char *user, uid_t *ret_uid, Hashmap **cache);
|
|
int name_to_gid_offline(const char *root, const char *group, gid_t *ret_gid, Hashmap **cache);
|