chiark / gitweb /
Make tables for DEFINE_STRING_TABLE_LOOKUP consistent
[elogind.git] / src / login / logind-acl.h
1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3 #pragma once
4
5 /***
6   This file is part of systemd.
7
8   Copyright 2011 Lennart Poettering
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 ***/
23
24 #include <sys/types.h>
25 #include <stdbool.h>
26 #include <libudev.h>
27
28 #ifdef HAVE_ACL
29
30 int devnode_acl(const char *path,
31                 bool flush,
32                 bool del, uid_t old_uid,
33                 bool add, uid_t new_uid);
34
35 int devnode_acl_all(struct udev *udev,
36                     const char *seat,
37                     bool flush,
38                     bool del, uid_t old_uid,
39                     bool add, uid_t new_uid);
40 #else
41
42 static inline int devnode_acl(const char *path,
43                 bool flush,
44                 bool del, uid_t old_uid,
45                 bool add, uid_t new_uid) {
46         return 0;
47 }
48
49 static inline int devnode_acl_all(struct udev *udev,
50                                   const char *seat,
51                                   bool flush,
52                                   bool del, uid_t old_uid,
53                                   bool add, uid_t new_uid) {
54         return 0;
55 }
56
57 #endif