login: move src/login/logind-acl.[ch] -> src/shared/devnode-acl.[ch]

The files are used by logind and udevd. And the functions in the files
are not specific to logind, and quite general enough to move to
libshared.
This commit is contained in:
Yu Watanabe
2021-01-19 07:04:19 +09:00
parent 100fd93f55
commit 0f46548deb
7 changed files with 9 additions and 13 deletions
+34
View File
@@ -0,0 +1,34 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <stdbool.h>
#include <sys/types.h>
#if HAVE_ACL
int devnode_acl(const char *path,
bool flush,
bool del, uid_t old_uid,
bool add, uid_t new_uid);
int devnode_acl_all(const char *seat,
bool flush,
bool del, uid_t old_uid,
bool add, uid_t new_uid);
#else
static inline int devnode_acl(const char *path,
bool flush,
bool del, uid_t old_uid,
bool add, uid_t new_uid) {
return 0;
}
static inline int devnode_acl_all(const char *seat,
bool flush,
bool del, uid_t old_uid,
bool add, uid_t new_uid) {
return 0;
}
#endif