File: cgiauth.h

package info (click to toggle)
nagios4 4.4.6-4.1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 22,336 kB
  • sloc: ansic: 97,631; sh: 12,619; javascript: 5,483; perl: 2,624; makefile: 1,265; php: 381; ruby: 95
file content (70 lines) | stat: -rw-r--r-- 2,306 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*****************************************************************************
 *
 * CGIAUTH.H - Authorization utilities header file
 *
 *
 * License:
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *****************************************************************************/

#ifndef NAGIOS_CGIAUTH_H_INCLUDED
#define NAGIOS_CGIAUTH_H_INCLUDED
#include "common.h"
#include "objects.h"

NAGIOS_BEGIN_DECL

typedef struct authdata_struct {
	char *username;
	int authorized_for_all_hosts;
	int authorized_for_all_host_commands;
	int authorized_for_all_services;
	int authorized_for_all_service_commands;
	int authorized_for_system_information;
	int authorized_for_system_commands;
	int authorized_for_configuration_information;
	int authorized_for_read_only;
	int authenticated;
	} authdata;



int get_authentication_information(authdata *);       /* gets current authentication information */

int is_authorized_for_host(host *, authdata *);
int is_authorized_for_service(service *, authdata *);

int is_authorized_for_all_hosts(authdata *);
int is_authorized_for_all_services(authdata *);

int is_authorized_for_system_information(authdata *);
int is_authorized_for_system_commands(authdata *);
int is_authorized_for_host_commands(host *, authdata *);
int is_authorized_for_service_commands(service *, authdata *);

int is_authorized_for_hostgroup(hostgroup *, authdata *);
int is_authorized_for_servicegroup(servicegroup *, authdata *);

int is_authorized_for_hostgroup_commands(hostgroup *, authdata *);
int is_authorized_for_servicegroup_commands(servicegroup *, authdata *);

int is_authorized_for_configuration_information(authdata *);

int is_authorized_for_read_only(authdata *);

NAGIOS_END_DECL

#endif