summaryrefslogtreecommitdiff
path: root/src/login/logind-acl.h
blob: 75c1434e97aa70e287c42029bf49052e7d30bcf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once

/***
  Copyright 2011 Lennart Poettering
***/

#include <stdbool.h>
#include <sys/types.h>

#if 0 /// elogind needs the systems udev header
#include "libudev.h"
#else
#include <libudev.h>
#endif // 0

#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(struct udev *udev,
                    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(struct udev *udev,
                                  const char *seat,
                                  bool flush,
                                  bool del, uid_t old_uid,
                                  bool add, uid_t new_uid) {
        return 0;
}

#endif