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