logind-acl.h revision 4bba9156da3e1df2cee24d10d7cd88c776ef4179
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering#ifndef foologindaclhfoo
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering#define foologindaclhfoo
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering/***
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering This file is part of systemd.
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering Copyright 2011 Lennart Poettering
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering systemd is free software; you can redistribute it and/or modify it
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering under the terms of the GNU General Public License as published by
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering the Free Software Foundation; either version 2 of the License, or
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering (at your option) any later version.
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering systemd is distributed in the hope that it will be useful, but
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering General Public License for more details.
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering You should have received a copy of the GNU General Public License
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
0ac38b707212e9aa40e25d65ffbae648cc9116f5Lennart Poettering***/
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering
81527be142678057215665be66e4b3c8306a7ab3Lennart Poettering#include <sys/types.h>
81527be142678057215665be66e4b3c8306a7ab3Lennart Poettering#include <stdbool.h>
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering#include <libudev.h>
0284adc6a60ce0af1107cb0b50041a65d731f39eLennart Poettering
0284adc6a60ce0af1107cb0b50041a65d731f39eLennart Poettering#ifdef HAVE_ACL
0284adc6a60ce0af1107cb0b50041a65d731f39eLennart Poettering
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poetteringint devnode_acl(const char *path,
6eb7a9a0010d035e5bdbbf70227088ce02b2120eZbigniew Jędrzejewski-Szmek bool flush,
6eb7a9a0010d035e5bdbbf70227088ce02b2120eZbigniew Jędrzejewski-Szmek bool del, uid_t old_uid,
6eb7a9a0010d035e5bdbbf70227088ce02b2120eZbigniew Jędrzejewski-Szmek bool add, uid_t new_uid);
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poetteringint devnode_acl_all(struct udev *udev,
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering const char *seat,
3c1668da6202f1ead3d4d3981b89e9da1a0e98e3Lennart Poettering bool flush,
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering bool del, uid_t old_uid,
de190aef08bb267b645205a747762df573b36834Lennart Poettering bool add, uid_t new_uid);
95ea1b90cc61f464f3b9bc147119dee4ba9620b8Lennart Poettering#else
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poetteringstatic inline int devnode_acl(const char *path,
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering bool flush,
95ea1b90cc61f464f3b9bc147119dee4ba9620b8Lennart Poettering bool del, uid_t old_uid,
95ea1b90cc61f464f3b9bc147119dee4ba9620b8Lennart Poettering bool add, uid_t new_uid) {
0ac38b707212e9aa40e25d65ffbae648cc9116f5Lennart Poettering return 0;
16e9f408fa9a9626059bdd6c89dc175e06b9e976Lennart Poettering}
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poetteringstatic inline int devnode_acl_all(struct udev *udev,
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering const char *seat,
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering bool flush,
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering bool del, uid_t old_uid,
c2373f848dddcc1827cf715c5ef778dc8d475761Lennart Poettering bool add, uid_t new_uid) {
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering return 0;
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering}
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering
c2373f848dddcc1827cf715c5ef778dc8d475761Lennart Poettering#endif
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering#endif
87d2c1ff6a7375f03476767e6f59454bcc5cd04bLennart Poettering