chiark / gitweb /
tree-wide: remove Lennart's copyright lines
[elogind.git] / src / login / logind-acl.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include <stdbool.h>
5 #include <sys/types.h>
6
7 #if 0 /// elogind needs the systems udev header
8 #include "libudev.h"
9 #else
10 #include <libudev.h>
11 #endif // 0
12
13 #if HAVE_ACL
14
15 int devnode_acl(const char *path,
16                 bool flush,
17                 bool del, uid_t old_uid,
18                 bool add, uid_t new_uid);
19
20 int devnode_acl_all(struct udev *udev,
21                     const char *seat,
22                     bool flush,
23                     bool del, uid_t old_uid,
24                     bool add, uid_t new_uid);
25 #else
26
27 static inline int devnode_acl(const char *path,
28                 bool flush,
29                 bool del, uid_t old_uid,
30                 bool add, uid_t new_uid) {
31         return 0;
32 }
33
34 static inline int devnode_acl_all(struct udev *udev,
35                                   const char *seat,
36                                   bool flush,
37                                   bool del, uid_t old_uid,
38                                   bool add, uid_t new_uid) {
39         return 0;
40 }
41
42 #endif