sysdb_sudo.h revision 5ff1c3c5a12930692cb6284d14f7fda3a974af8e
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase Jakub Hrozek <jhrozek@redhat.com>
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase Copyright (C) 2011 Red Hat
d327eb79653cf7820fe583473ab35816d44cd757Eugen Kuksa This program is free software; you can redistribute it and/or modify
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase it under the terms of the GNU General Public License as published by
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase the Free Software Foundation; either version 3 of the License, or
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase (at your option) any later version.
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase This program is distributed in the hope that it will be useful,
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase but WITHOUT ANY WARRANTY; without even the implied warranty of
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase GNU General Public License for more details.
fd06b6c734f708f4e7492e15d16e4a51840568a3Tim Reddehase You should have received a copy of the GNU General Public License
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase along with this program. If not, see <http://www.gnu.org/licenses/>.
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase/* subdirs in cn=custom in sysdb. We don't store sudo stuff in sysdb directly
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase * b/c it's not name-service-switch data */
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase/* attribute of SUDORULE_SUBDIR
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase * should be true if we have downloaded all rules atleast once */
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase#define SYSDB_SUDO_AT_LAST_FULL_REFRESH "sudoLastFullRefreshTime"
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase/* sysdb attributes */
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase#define SYSDB_SUDO_CACHE_AT_COMMAND "sudoCommand"
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase#define SYSDB_SUDO_CACHE_AT_OPTION "sudoOption"
d327eb79653cf7820fe583473ab35816d44cd757Eugen Kuksa#define SYSDB_SUDO_CACHE_AT_RUNASUSER "sudoRunAsUser"
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase#define SYSDB_SUDO_CACHE_AT_RUNASGROUP "sudoRunAsGroup"
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase#define SYSDB_SUDO_CACHE_AT_NOTBEFORE "sudoNotBefore"
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase#define SYSDB_SUDO_CACHE_AT_NOTAFTER "sudoNotAfter"
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase/* When constructing a sysdb filter, OR these values to include.. */
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase#define SYSDB_SUDO_FILTER_NONE 0x00 /* no additional filter */
d327eb79653cf7820fe583473ab35816d44cd757Eugen Kuksa#define SYSDB_SUDO_FILTER_USERNAME 0x01 /* username */
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase#define SYSDB_SUDO_FILTER_GROUPS 0x04 /* groups */
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase#define SYSDB_SUDO_FILTER_NGRS 0x08 /* netgroups */
d327eb79653cf7820fe583473ab35816d44cd757Eugen Kuksa#define SYSDB_SUDO_FILTER_ONLY_EXPIRED 0x10 /* only expired */
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase#define SYSDB_SUDO_FILTER_INCLUDE_ALL 0x20 /* ALL */
f5ce2d234d8a23051090e64223ae4364662ae502Tim Reddehase#define SYSDB_SUDO_FILTER_INCLUDE_DFL 0x40 /* include cn=default */
char **_filter);
char ***groupnames);
const char *rule_name,
const char *name);
const char *filter);