summaryrefslogtreecommitdiff
path: root/check/check.h
blob: ac45578a2a8b2ce1b6b486e6762957eacc1cb26a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef PRIVEXEC_CHECK_H
#define PRIVEXEC_CHECK_H

#ifndef CONFIG_PATH
#define CONFIG_PATH		"/etc/privexec.conf"
#endif

#ifndef PAM_SERVICE_NAME
#define PAM_SERVICE_NAME	"privexec"
#endif

#ifndef PRIVEXEC_LOG_ID
#define PRIVEXEC_LOG_ID		"privexec"
#endif

enum permission { UNKNOWN, AUTHORIZED, AUTHENTICATE, DENIED };

void fatal(int include_errno, char *fmt, ...);
enum permission get_permission(const char *user, const char *group, const char *cmd);
int authenticate(const char *user);

#endif