2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2012-07-18 19:07:51 +02:00
|
|
|
#pragma once
|
2011-05-24 04:20:35 +02:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
2015-11-18 22:46:33 +01:00
|
|
|
#include <sys/types.h>
|
2015-10-24 22:58:24 +02:00
|
|
|
|
2017-10-03 10:41:51 +02:00
|
|
|
#if HAVE_ACL
|
2011-07-11 22:29:45 +02:00
|
|
|
|
2011-05-24 04:20:35 +02:00
|
|
|
int devnode_acl(const char *path,
|
|
|
|
bool flush,
|
|
|
|
bool del, uid_t old_uid,
|
|
|
|
bool add, uid_t new_uid);
|
|
|
|
|
2018-08-22 07:53:51 +02:00
|
|
|
int devnode_acl_all(const char *seat,
|
2011-05-24 04:20:35 +02:00
|
|
|
bool flush,
|
|
|
|
bool del, uid_t old_uid,
|
|
|
|
bool add, uid_t new_uid);
|
2011-07-11 22:29:45 +02:00
|
|
|
#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;
|
|
|
|
}
|
|
|
|
|
2018-08-22 07:53:51 +02:00
|
|
|
static inline int devnode_acl_all(const char *seat,
|
2011-07-11 22:29:45 +02:00
|
|
|
bool flush,
|
|
|
|
bool del, uid_t old_uid,
|
|
|
|
bool add, uid_t new_uid) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|