2011-05-24 04:20:35 +02:00
|
|
|
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
|
|
|
|
2012-07-18 19:07:51 +02:00
|
|
|
#pragma once
|
2011-05-24 04:20:35 +02:00
|
|
|
|
|
|
|
/***
|
|
|
|
This file is part of systemd.
|
|
|
|
|
|
|
|
Copyright 2011 Lennart Poettering
|
|
|
|
|
|
|
|
systemd is free software; you can redistribute it and/or modify it
|
2012-04-12 00:20:58 +02:00
|
|
|
under the terms of the GNU Lesser General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2.1 of the License, or
|
2011-05-24 04:20:35 +02:00
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
systemd is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2012-04-12 00:20:58 +02:00
|
|
|
Lesser General Public License for more details.
|
2011-05-24 04:20:35 +02:00
|
|
|
|
2012-04-12 00:20:58 +02:00
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
2011-05-24 04:20:35 +02:00
|
|
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
***/
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
2015-11-18 22:46:33 +01:00
|
|
|
#include <sys/types.h>
|
2015-10-24 22:58:24 +02:00
|
|
|
|
|
|
|
#include "libudev.h"
|
2011-05-24 04:20:35 +02:00
|
|
|
|
2011-07-11 22:29:45 +02:00
|
|
|
#ifdef HAVE_ACL
|
|
|
|
|
2011-05-24 04:20:35 +02:00
|
|
|
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);
|
2011-07-11 22:29:45 +02:00
|
|
|
#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
|