version 1.1.1.1, 2012/02/21 16:23:02
|
version 1.1.1.5, 2014/06/15 16:12:54
|
Line 1
|
Line 1
|
/* |
/* |
* Copyright (c) 1999-2005, 2008-2010 | * Copyright (c) 1999-2005, 2008-2013 |
* Todd C. Miller <Todd.Miller@courtesan.com> |
* Todd C. Miller <Todd.Miller@courtesan.com> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
Line 19
|
Line 19
|
* Materiel Command, USAF, under agreement number F39502-99-1-0512. |
* Materiel Command, USAF, under agreement number F39502-99-1-0512. |
*/ |
*/ |
|
|
#ifndef _SUDO_DEFAULTS_H | #ifndef _SUDOERS_DEFAULTS_H |
#define _SUDO_DEFAULTS_H | #define _SUDOERS_DEFAULTS_H |
|
|
#include <def_data.h> |
#include <def_data.h> |
|
|
struct list_member { |
struct list_member { |
|
SLIST_ENTRY(list_member) entries; |
char *value; |
char *value; |
struct list_member *next; |
|
}; |
}; |
|
|
struct def_values { | SLIST_HEAD(list_members, list_member); |
char *sval; /* string value */ | |
int ival; /* actually an enum */ | |
}; | |
|
|
enum list_ops { |
enum list_ops { |
add, |
add, |
Line 40 enum list_ops {
|
Line 37 enum list_ops {
|
freeall |
freeall |
}; |
}; |
|
|
|
/* Mapping of tuple string value to enum def_tuple. */ |
|
struct def_values { |
|
char *sval; /* string value */ |
|
enum def_tuple nval;/* numeric value */ |
|
}; |
|
|
/* |
/* |
* Structure describing compile-time and run-time options. |
* Structure describing compile-time and run-time options. |
*/ |
*/ |
Line 52 struct sudo_defs_types {
|
Line 55 struct sudo_defs_types {
|
union { |
union { |
int flag; |
int flag; |
int ival; |
int ival; |
|
unsigned int uival; |
double fval; |
double fval; |
enum def_tuple tuple; |
enum def_tuple tuple; |
char *str; |
char *str; |
mode_t mode; |
mode_t mode; |
struct list_member *list; | struct list_members list; |
} sd_un; |
} sd_un; |
}; |
}; |
|
|
Line 93 struct sudo_defs_types {
|
Line 97 struct sudo_defs_types {
|
#define T_PATH 0x200 |
#define T_PATH 0x200 |
|
|
/* |
/* |
* Argument to update_defaults() | * Argument to update_defaults() and check_defaults() |
*/ |
*/ |
#define SETDEF_GENERIC 0x01 |
#define SETDEF_GENERIC 0x01 |
#define SETDEF_HOST 0x02 |
#define SETDEF_HOST 0x02 |
Line 107 struct sudo_defs_types {
|
Line 111 struct sudo_defs_types {
|
*/ |
*/ |
void dump_default(void); |
void dump_default(void); |
void init_defaults(void); |
void init_defaults(void); |
int set_default(char *, char *, int); | bool set_default(char *var, char *val, int op); |
int update_defaults(int); | bool update_defaults(int what); |
| bool check_defaults(int what, bool quiet); |
|
|
extern struct sudo_defs_types sudo_defs_table[]; |
extern struct sudo_defs_types sudo_defs_table[]; |
|
|
#endif /* _SUDO_DEFAULTS_H */ | #endif /* _SUDOERS_DEFAULTS_H */ |