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