OpenVPN
src
openvpnserv
validate.h
Go to the documentation of this file.
1
2
/*
3
* OpenVPN -- An application to securely tunnel IP networks
4
* over a single TCP/UDP port, with support for SSL/TLS-based
5
* session authentication and key exchange,
6
* packet encryption, packet authentication, and
7
* packet compression.
8
*
9
* Copyright (C) 2016-2024 Selva Nair <selva.nair@gmail.com>
10
*
11
* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License version 2
13
* as published by the Free Software Foundation.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
19
*
20
* You should have received a copy of the GNU General Public License along
21
* with this program; if not, write to the Free Software Foundation, Inc.,
22
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23
*/
24
25
#ifndef VALIDATE_H
26
#define VALIDATE_H
27
28
#include "
service.h
"
29
30
/* Authorized groups who can use any options and config locations */
31
#define SYSTEM_ADMIN_GROUP TEXT("Administrators")
32
#define OVPN_ADMIN_GROUP TEXT("OpenVPN Administrators")
33
/* The last one may be reset in registry: HKLM\Software\OpenVPN\ovpn_admin_group */
34
35
BOOL
36
IsAuthorizedUser
(PSID sid,
const
HANDLE token,
const
WCHAR *ovpn_admin_group);
37
38
BOOL
39
CheckOption
(
const
WCHAR *workdir,
int
narg, WCHAR *
argv
[],
const
settings_t
*s);
40
41
static
inline
BOOL
42
IsOption
(
const
WCHAR *o)
43
{
44
return
(wcsncmp(o, L
"--"
, 2) == 0);
45
}
46
47
#endif
/* ifndef VALIDATE_H */
argv
Definition:
argv.h:35
service.h
IsAuthorizedUser
BOOL IsAuthorizedUser(PSID sid, const HANDLE token, const WCHAR *ovpn_admin_group)
Definition:
validate.c:148
settings_t
Definition:
service.h:67
IsOption
static BOOL IsOption(const WCHAR *o)
Definition:
validate.h:42
CheckOption
BOOL CheckOption(const WCHAR *workdir, int narg, WCHAR *argv[], const settings_t *s)
Definition:
validate.c:317
Generated by
1.8.17