From a2ec3bba9c7018c445941bb9f3a7ddc1b31bfb1d Mon Sep 17 00:00:00 2001
From: Dimitri Papadopoulos
<3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Date: Mon, 25 May 2026 14:55:42 +0200
Subject: [PATCH] Consistent include files and directives
* Import system headers as `#include <...>`.
* Import local headers as `#include "..."`.
* Use consistent header guards (starting with `OC_`).
Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
---
src/acct/pam.c | 12 ++++++------
src/acct/pam.h | 6 +++---
src/acct/radius.c | 9 ++++-----
src/acct/radius.h | 6 +++---
src/auth-unix.c | 4 ++--
src/auth-unix.h | 2 +-
src/auth/common.c | 4 ++--
src/auth/common.h | 4 ++--
src/auth/gssapi.c | 6 +++---
src/auth/gssapi.h | 6 +++---
src/auth/openidconnect.c | 6 +++---
src/auth/openidconnect.h | 6 +++---
src/auth/pam-stack.h | 2 +-
src/auth/pam.c | 8 ++++----
src/auth/pam.h | 12 ++++++------
src/auth/plain.c | 10 +++++-----
src/auth/plain.h | 6 +++---
src/auth/radius.c | 6 +++---
src/auth/radius.h | 6 +++---
src/common-config.h | 6 +++---
src/common/base64-helper.c | 4 ++--
src/common/base64-helper.h | 4 ++--
src/common/common.c | 4 ++--
src/common/common.h | 6 +++---
src/common/hmac.c | 6 +++---
src/common/hmac.h | 4 ++--
src/common/snapshot.c | 10 +++++-----
src/common/snapshot.h | 5 ++---
src/common/sockdiag.c | 2 +-
src/common/sockdiag.h | 7 +++----
src/common/system.c | 6 +++---
src/common/system.h | 6 +++---
src/config-kkdcp.c | 2 +-
src/config-ports.c | 6 +++---
src/config.c | 40 +++++++++++++++++++-------------------
src/gettime.h | 3 +--
src/html.c | 4 ++--
src/http-heads.h | 6 +++---
src/icmp-ping.c | 6 +++---
src/icmp-ping.h | 2 +-
src/inih/ini.c | 2 +-
src/ip-lease.c | 10 +++++-----
src/ip-lease.h | 6 +++---
src/ip-util.c | 2 +-
src/isolate.c | 6 +++---
src/isolate.h | 1 -
src/log.c | 8 ++++----
src/log.h | 2 +-
src/lzs.c | 2 +-
src/lzs.h | 1 -
src/main-auth.c | 20 +++++++++----------
src/main-ban.c | 18 ++++++++---------
src/main-ctl-unix.c | 22 ++++++++++-----------
src/main-ctl.h | 2 +-
src/main-limits.c | 4 ++--
src/main-limits.h | 5 ++---
src/main-log.c | 8 ++++----
src/main-proc.c | 30 ++++++++++++++--------------
src/main-sec-mod-cmd.c | 26 ++++++++++++-------------
src/main-user.c | 22 ++++++++++-----------
src/main-worker-cmd.c | 30 ++++++++++++++--------------
src/main.c | 38 ++++++++++++++++++------------------
src/main.h | 10 +++++-----
src/namespace.c | 6 +++---
src/namespace.h | 3 +--
src/occtl/cache.c | 4 ++--
src/occtl/ctl.h | 4 ++--
src/occtl/geoip.c | 2 +-
src/occtl/geoip.h | 1 -
src/occtl/ip-cache.c | 6 +++---
src/occtl/json.c | 2 +-
src/occtl/json.h | 2 +-
src/occtl/maxmind.c | 2 +-
src/occtl/nl.c | 4 ++--
src/occtl/occtl.c | 6 +++---
src/occtl/occtl.h | 2 +-
src/occtl/pager.c | 4 ++--
src/occtl/print.c | 10 +++++-----
src/occtl/session-cache.c | 6 +++---
src/occtl/time.c | 4 ++--
src/occtl/unix.c | 18 ++++++++---------
src/ocpasswd/ocpasswd.c | 2 +-
src/proc-search.c | 8 ++++----
src/proc-search.h | 6 +++---
src/route-add.c | 10 +++++-----
src/route-add.h | 4 ++--
src/script-list.h | 2 +-
src/sec-mod-acct.h | 4 ++--
src/sec-mod-auth.c | 35 ++++++++++++++++-----------------
src/sec-mod-auth.h | 4 ++--
src/sec-mod-cookies.c | 12 ++++++------
src/sec-mod-db.c | 18 ++++++++---------
src/sec-mod-resume.c | 14 ++++++-------
src/sec-mod-resume.h | 2 +-
src/sec-mod-sup-config.c | 18 ++++++++---------
src/sec-mod-sup-config.h | 2 +-
src/sec-mod.c | 18 ++++++++---------
src/sec-mod.h | 6 +++---
src/setproctitle.c | 2 +-
src/setproctitle.h | 2 +-
src/str.c | 6 +++---
src/str.h | 3 +--
src/subconfig.c | 8 ++++----
src/sup-config/file.c | 16 +++++++--------
src/sup-config/file.h | 2 +-
src/sup-config/radius.c | 14 ++++++-------
src/sup-config/radius.h | 2 +-
src/tlslib.c | 14 ++++++-------
src/tlslib.h | 4 ++--
src/tun.c | 12 ++++++------
src/tun.h | 4 ++--
src/valid-hostname.c | 2 +-
src/vasprintf.c | 2 +-
src/vasprintf.h | 2 +-
src/vhost.h | 4 ++--
src/vpn.h | 16 +++++++--------
src/worker-auth.c | 16 +++++++--------
src/worker-bandwidth.c | 10 +++++-----
src/worker-bandwidth.h | 2 +-
src/worker-http-handlers.c | 8 ++++----
src/worker-http.c | 8 ++++----
src/worker-kkdcp.c | 8 ++++----
src/worker-latency.c | 6 +++---
src/worker-log.c | 8 ++++----
src/worker-misc.c | 8 ++++----
src/worker-privs.c | 4 ++--
src/worker-proxyproto.c | 4 ++--
src/worker-resume.c | 10 +++++-----
src/worker-svc.c | 10 +++++-----
src/worker-tun.c | 12 ++++++------
src/worker-vpn.c | 20 +++++++++----------
src/worker.c | 14 ++++++-------
src/worker.h | 15 +++++++-------
133 files changed, 526 insertions(+), 538 deletions(-)
diff --git a/src/acct/pam.c b/src/acct/pam.c
index dc7f561e..8550aac0 100644
--- a/src/acct/pam.c
+++ b/src/acct/pam.c
@@ -17,13 +17,13 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
#include
-#include
-#include "pam.h"
-#include
+#include "vpn.h"
+#include "acct/pam.h"
+#include "sec-mod-acct.h"
#include "log.h"
@@ -33,8 +33,8 @@
#include
#include
#include
-#include
-#include
+#include "pcl.h"
+#include "str.h"
#include "auth/pam.h"
static int ocserv_conv(int msg_size, const struct pam_message **msg,
diff --git a/src/acct/pam.h b/src/acct/pam.h
index 055ff025..25458e2e 100644
--- a/src/acct/pam.h
+++ b/src/acct/pam.h
@@ -18,10 +18,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-#ifndef ACCT_PAM_H
-#define ACCT_PAM_H
+#ifndef OC_ACCT_PAM_H
+#define OC_ACCT_PAM_H
-#include
+#include "sec-mod-acct.h"
extern const struct acct_mod_st pam_acct_funcs;
diff --git a/src/acct/radius.c b/src/acct/radius.c
index ddcaeaf3..9f13ba88 100644
--- a/src/acct/radius.c
+++ b/src/acct/radius.c
@@ -17,16 +17,16 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
#include
#include
#include
-#include
+#include "vpn.h"
#include
#include /* inet_ntop */
-#include "radius.h"
+#include "acct/radius.h"
#include "auth/common.h"
#include "log.h"
@@ -39,9 +39,8 @@
#include
#endif
-#include
+#include "sec-mod-acct.h"
#include "auth/radius.h"
-#include "acct/radius.h"
#include "common-config.h"
static void acct_radius_vhost_init(void **_vctx, void *pool, void *additional)
diff --git a/src/acct/radius.h b/src/acct/radius.h
index b6b10a36..a005b196 100644
--- a/src/acct/radius.h
+++ b/src/acct/radius.h
@@ -18,10 +18,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-#ifndef ACCT_RADIUS_H
-#define ACCT_RADIUS_H
+#ifndef OC_ACCT_RADIUS_H
+#define OC_ACCT_RADIUS_H
-#include
+#include "sec-mod-auth.h"
extern const struct acct_mod_st radius_acct_funcs;
diff --git a/src/auth-unix.c b/src/auth-unix.c
index 628467b0..5c9d7b95 100644
--- a/src/auth-unix.c
+++ b/src/auth-unix.c
@@ -17,13 +17,13 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
#include
#include
#include
-#include
+#include "sec-mod-auth.h"
#include "auth-unix.h"
#include "log.h"
diff --git a/src/auth-unix.h b/src/auth-unix.h
index 8dbf03ef..bf0844e0 100644
--- a/src/auth-unix.h
+++ b/src/auth-unix.h
@@ -1,7 +1,7 @@
#ifndef OC_AUTH_UNIX_H
#define OC_AUTH_UNIX_H
-#include
+#include "config.h"
#if defined(HAVE_GSSAPI) || defined(HAVE_PAM)
#define HAVE_GET_USER_AUTH_GROUP
diff --git a/src/auth/common.c b/src/auth/common.c
index 6f4d104c..87aff8c0 100644
--- a/src/auth/common.c
+++ b/src/auth/common.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include "config.h"
+#include "auth/common.h"
const char pass_msg_second[] = "Please enter your challenge password.";
const char pass_msg_failed[] = "Login failed.\nPlease enter your password.";
diff --git a/src/auth/common.h b/src/auth/common.h
index a0854e91..279bf338 100644
--- a/src/auth/common.h
+++ b/src/auth/common.h
@@ -1,5 +1,5 @@
-#ifndef AUTH_COMMON_H
-#define AUTH_COMMON_H
+#ifndef OC_AUTH_COMMON_H
+#define OC_AUTH_COMMON_H
#define MAX_PASSWORD_TRIES 3
diff --git a/src/auth/gssapi.c b/src/auth/gssapi.c
index a8045c61..7304b69c 100644
--- a/src/auth/gssapi.c
+++ b/src/auth/gssapi.c
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#ifdef HAVE_GSSAPI
@@ -25,7 +25,7 @@
#include
#include
#include
-#include
+#include "vpn.h"
#include
#include "gssapi.h"
#include "auth/common.h"
@@ -33,7 +33,7 @@
#include
#include
#include
-#include
+#include "common/base64-helper.h"
#include "common-config.h"
#include "log.h"
diff --git a/src/auth/gssapi.h b/src/auth/gssapi.h
index b5c56aaa..d5c1866c 100644
--- a/src/auth/gssapi.h
+++ b/src/auth/gssapi.h
@@ -18,10 +18,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-#ifndef GSSAPI_H
-#define GSSAPI_H
+#ifndef OC_AUTH_GSSAPI_H
+#define OC_AUTH_GSSAPI_H
-#include
+#include "sec-mod-auth.h"
extern const struct auth_mod_st gssapi_auth_funcs;
diff --git a/src/auth/openidconnect.c b/src/auth/openidconnect.c
index 82da4b02..aeb0f870 100644
--- a/src/auth/openidconnect.c
+++ b/src/auth/openidconnect.c
@@ -14,14 +14,14 @@
* along with this program. If not, see
*/
-#include
+#include "config.h"
#include
#include
#include
#include
-#include
+#include "vpn.h"
#include
-#include "plain.h"
+#include "auth/plain.h"
#include "common-config.h"
#include "auth/common.h"
diff --git a/src/auth/openidconnect.h b/src/auth/openidconnect.h
index 9962be6a..be44e2d4 100644
--- a/src/auth/openidconnect.h
+++ b/src/auth/openidconnect.h
@@ -13,10 +13,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-#ifndef OPENIDCONNECT_H
-#define OPENIDCONNECT_H
+#ifndef OC_AUTH_OPENIDCONNECT_H
+#define OC_AUTH_OPENIDCONNECT_H
-#include
+#include "sec-mod-auth.h"
extern const struct auth_mod_st oidc_auth_funcs;
diff --git a/src/auth/pam-stack.h b/src/auth/pam-stack.h
index 195272dd..18570576 100644
--- a/src/auth/pam-stack.h
+++ b/src/auth/pam-stack.h
@@ -19,7 +19,7 @@
#ifndef PAM_STACK_H
#define PAM_STACK_H
-#include
+#include "config.h"
#include
#ifdef __linux__
#include
diff --git a/src/auth/pam.c b/src/auth/pam.c
index 139a3d26..1180925c 100644
--- a/src/auth/pam.c
+++ b/src/auth/pam.c
@@ -17,16 +17,16 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
#include
-#include
+#include "vpn.h"
#include "pam.h"
#include "common-config.h"
#include "auth-unix.h"
-#include
-#include
+#include "sec-mod-auth.h"
+#include "ccan/hash/hash.h"
#include "log.h"
#ifdef HAVE_PAM
diff --git a/src/auth/pam.h b/src/auth/pam.h
index 4209b098..ad191a6c 100644
--- a/src/auth/pam.h
+++ b/src/auth/pam.h
@@ -18,17 +18,17 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-#ifndef PAM_H
-#define PAM_H
+#ifndef OC_AUTH_PAM_H
+#define OC_AUTH_PAM_H
-#include
-#include
+#include "config.h"
+#include "sec-mod-auth.h"
#ifdef HAVE_PAM
#include
-#include
-#include
+#include "str.h"
+#include "pcl.h"
#include "pam-stack.h"
extern const struct auth_mod_st pam_auth_funcs;
diff --git a/src/auth/plain.c b/src/auth/plain.c
index db6f7586..77b26f08 100644
--- a/src/auth/plain.c
+++ b/src/auth/plain.c
@@ -18,18 +18,18 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
#include
#include
-#include
+#include "vpn.h"
#include
-#include "plain.h"
+#include "auth/plain.h"
#include "common-config.h"
#include "auth/common.h"
-#include
-#include
+#include "ccan/htable/htable.h"
+#include "ccan/hash/hash.h"
#ifdef HAVE_LIBOATH
#include
#endif
diff --git a/src/auth/plain.h b/src/auth/plain.h
index 0d386776..994bfb66 100644
--- a/src/auth/plain.h
+++ b/src/auth/plain.h
@@ -18,10 +18,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-#ifndef PLAIN_H
-#define PLAIN_H
+#ifndef OC_AUTH_PLAIN_H
+#define OC_AUTH_PLAIN_H
-#include
+#include "sec-mod-auth.h"
extern const struct auth_mod_st plain_auth_funcs;
diff --git a/src/auth/radius.c b/src/auth/radius.c
index 96768f6b..631390a0 100644
--- a/src/auth/radius.c
+++ b/src/auth/radius.c
@@ -18,18 +18,18 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
#include
#include
-#include
+#include "vpn.h"
#include
#include /* inet_ntop */
#include "radius.h"
#include "auth/common.h"
#include "str.h"
-#include
+#include "ccan/hash/hash.h"
#ifdef HAVE_RADIUS
diff --git a/src/auth/radius.h b/src/auth/radius.h
index e84c3e22..9a17d181 100644
--- a/src/auth/radius.h
+++ b/src/auth/radius.h
@@ -18,10 +18,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-#ifndef RADIUS_H
-#define RADIUS_H
+#ifndef OC_AUTH_RADIUS_H
+#define OC_AUTH_RADIUS_H
-#include
+#include "sec-mod-auth.h"
#include "common/common.h"
#ifdef HAVE_RADIUS
diff --git a/src/common-config.h b/src/common-config.h
index 9b98ded8..7b686582 100644
--- a/src/common-config.h
+++ b/src/common-config.h
@@ -21,9 +21,9 @@
#ifndef OC_COMMON_CONFIG_H
#define OC_COMMON_CONFIG_H
-#include
-#include
-#include
+#include "config.h"
+#include "vpn.h"
+#include "ipc.pb-c.h"
char *sanitize_config_value(void *pool, const char *value);
int _add_multi_line_val(void *pool, char ***varname, size_t *num,
diff --git a/src/common/base64-helper.c b/src/common/base64-helper.c
index d4d555c8..b49aff60 100644
--- a/src/common/base64-helper.c
+++ b/src/common/base64-helper.c
@@ -17,10 +17,10 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
-#include "base64-helper.h"
+#include "common/base64-helper.h"
void oc_base64_encode(const char *in, size_t inlen, char *out, size_t outlen)
{
diff --git a/src/common/base64-helper.h b/src/common/base64-helper.h
index c625f385..e2e1936c 100644
--- a/src/common/base64-helper.h
+++ b/src/common/base64-helper.h
@@ -18,8 +18,8 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-#ifndef BASE64_HELPER_H
-#define BASE64_HELPER_H
+#ifndef OC_COMMON_BASE64_HELPER_H
+#define OC_COMMON_BASE64_HELPER_H
#include
diff --git a/src/common/common.c b/src/common/common.c
index b2f9a315..9f5abb95 100644
--- a/src/common/common.c
+++ b/src/common/common.c
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
#include
@@ -34,7 +34,7 @@
#include
#include
#include
-#include "common.h"
+#include "common/common.h"
#include "defs.h"
#include "common/base64-helper.h"
#include "log.h"
diff --git a/src/common/common.h b/src/common/common.h
index e706175e..f361b63d 100644
--- a/src/common/common.h
+++ b/src/common/common.h
@@ -19,12 +19,12 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-#ifndef COMMON_H
-#define COMMON_H
+#ifndef OC_COMMON_COMMON_H
+#define OC_COMMON_COMMON_H
#include
#include
-#include
+#include "ipc.pb-c.h"
#include
#include
#include
diff --git a/src/common/hmac.c b/src/common/hmac.c
index e51b2a29..8a6405ce 100644
--- a/src/common/hmac.c
+++ b/src/common/hmac.c
@@ -19,7 +19,7 @@
* along with this program. If not, see
*/
-#include
+#include "config.h"
#include
#include
@@ -27,8 +27,8 @@
#include
#include
#include
-#include
-#include
+#include "common/common.h"
+#include "common/hmac.h"
#include
bool hmac_init_key(size_t key_length, uint8_t *key)
diff --git a/src/common/hmac.h b/src/common/hmac.h
index d6c38453..498460e0 100644
--- a/src/common/hmac.h
+++ b/src/common/hmac.h
@@ -18,9 +18,9 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
+#ifndef OC_COMMON_HMAC_H
+#define OC_COMMON_HMAC_H
-#ifndef HMAC_H
-#define HMAC_H
#include
#define HMAC_DIGEST_SIZE 32
diff --git a/src/common/snapshot.c b/src/common/snapshot.c
index f0dc2d63..b199df8a 100644
--- a/src/common/snapshot.c
+++ b/src/common/snapshot.c
@@ -19,7 +19,7 @@
* along with this program. If not, see
*/
-#include
+#include "config.h"
#include
#include
#include
@@ -30,12 +30,12 @@
#include
#include
#include
-#include
+#include "common/common.h"
-#include
-#include
+#include "ccan/htable/htable.h"
+#include "ccan/hash/hash.h"
-#include
+#include "snapshot.h"
#define ERRSTR "error: "
#define WARNSTR "warning: "
diff --git a/src/common/snapshot.h b/src/common/snapshot.h
index b55a8481..4b6931e4 100644
--- a/src/common/snapshot.h
+++ b/src/common/snapshot.h
@@ -18,9 +18,8 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-
-#ifndef SNAPSHOT_H
-#define SNAPSHOT_H
+#ifndef OC_COMMON_SNAPSHOT_H
+#define OC_COMMON_SNAPSHOT_H
struct snapshot_t;
struct snapshot_iter_t;
diff --git a/src/common/sockdiag.c b/src/common/sockdiag.c
index 8ee2ceaf..4e1a83f1 100644
--- a/src/common/sockdiag.c
+++ b/src/common/sockdiag.c
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
#include
diff --git a/src/common/sockdiag.h b/src/common/sockdiag.h
index a3b32cf4..9dd3c54a 100644
--- a/src/common/sockdiag.h
+++ b/src/common/sockdiag.h
@@ -18,11 +18,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
+#ifndef OC_COMMON_SOCKDIAG_H
+#define OC_COMMON_SOCKDIAG_H
-#ifndef SOCKDIAG_H
-#define SOCKDIAG_H
-
-#include
+#include "config.h"
int sockdiag_query_unix_domain_socket_queue_length(const char *socket_name,
int *sock_rqueue,
diff --git a/src/common/system.c b/src/common/system.c
index d4d4ccb9..6d9cfb42 100644
--- a/src/common/system.c
+++ b/src/common/system.c
@@ -17,8 +17,8 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include "config.h"
+#include "common/system.h"
#include
#ifdef __linux__
#include
@@ -32,7 +32,7 @@
#include
#include
#include
-#include
+#include "defs.h"
#include "log.h"
void kill_on_parent_kill(int sig)
diff --git a/src/common/system.h b/src/common/system.h
index 6864fd92..fef781cf 100644
--- a/src/common/system.h
+++ b/src/common/system.h
@@ -18,10 +18,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-#ifndef DIE_H
-#define DIE_H
+#ifndef OC_COMMON_SYSTEM_H
+#define OC_COMMON_SYSTEM_H
-#include
+#include "config.h"
#include
#include
diff --git a/src/config-kkdcp.c b/src/config-kkdcp.c
index eb27fa0b..143477ce 100644
--- a/src/config-kkdcp.c
+++ b/src/config-kkdcp.c
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
diff --git a/src/config-ports.c b/src/config-ports.c
index 7705384e..ef3b413e 100644
--- a/src/config-ports.c
+++ b/src/config-ports.c
@@ -15,17 +15,17 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
#include
-#include
+#include "common-config.h"
#include
#include
#include "log.h"
-#include
+#include "vpn.h"
static int append_port(void *pool, FwPortSt ***fw_ports, size_t *n_fw_ports,
int port, fw_proto_t proto, unsigned int negate)
diff --git a/src/config.c b/src/config.c
index a984ebd3..baa469a6 100644
--- a/src/config.c
+++ b/src/config.c
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
@@ -27,20 +27,20 @@
#include
#include
#include
-#include
-#include
+#include "common/common.h"
+#include "ip-util.h"
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include "inih/ini.h"
+#include "auth/pam.h"
+#include "acct/pam.h"
+#include "auth/radius.h"
+#include "acct/radius.h"
+#include "auth/plain.h"
+#include "auth/gssapi.h"
+#include "auth/openidconnect.h"
+#include "auth/common.h"
+#include "sec-mod-sup-config.h"
+#include "sec-mod-acct.h"
+#include
#include
#include
@@ -48,16 +48,16 @@
#include
#include
-#include
-#include
-#include
-#include
-#include
+#include "vpn.h"
+#include "cfg.pb-c.h"
+#include "main.h"
+#include "tlslib.h"
+#include "occtl/ctl.h"
#include
#include "common-config.h"
#include
-#include
+#include "common/snapshot.h"
#define OLD_DEFAULT_CFG_FILE "/etc/ocserv.conf"
#define DEFAULT_CFG_FILE "/etc/ocserv/ocserv.conf"
diff --git a/src/gettime.h b/src/gettime.h
index 4306f18f..24c5d6cf 100644
--- a/src/gettime.h
+++ b/src/gettime.h
@@ -18,11 +18,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-
#ifndef OC_GETTIME_H
#define OC_GETTIME_H
-#include
+#include "config.h"
#include
#include
diff --git a/src/html.c b/src/html.c
index 60d4f823..2058c5f8 100644
--- a/src/html.c
+++ b/src/html.c
@@ -15,14 +15,14 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
#include
#include
#include
-#include
+#include "common/common.h"
#include
#include
diff --git a/src/http-heads.h b/src/http-heads.h
index 87a91bbb..f3c20b05 100644
--- a/src/http-heads.h
+++ b/src/http-heads.h
@@ -1,5 +1,5 @@
-#ifndef HTTP_HEADS_H
-#define HTTP_HEADS_H
+#ifndef OC_HTTP_HEADS_H
+#define OC_HTTP_HEADS_H
#include
@@ -10,4 +10,4 @@ struct http_headers_st {
const struct http_headers_st *in_word_set(const char *str, size_t len);
-#endif /* HTTP_HEADS_H */
+#endif
diff --git a/src/icmp-ping.c b/src/icmp-ping.c
index 42e5ffd8..c4844d84 100644
--- a/src/icmp-ping.c
+++ b/src/icmp-ping.c
@@ -70,8 +70,8 @@
/* Ported to ocserv by Nikos Mavrogiannopoulos */
-#include
-#include
+#include "config.h"
+#include "main.h"
#include
#ifdef HAVE_NETINET_IN_SYSTM_H
#include
@@ -85,7 +85,7 @@
#include
#include
#include
-#include
+#include "icmp-ping.h"
#include
#ifndef ICMP_DEST_UNREACH
diff --git a/src/icmp-ping.h b/src/icmp-ping.h
index 0f5936c4..3ae8d59c 100644
--- a/src/icmp-ping.h
+++ b/src/icmp-ping.h
@@ -21,7 +21,7 @@
#ifndef OC_ICMP_PING_H
#define OC_ICMP_PING_H
-#include
+#include "main.h"
/* returns the number of positive replies received or
* 0 if no host with this IP exists. */
diff --git a/src/inih/ini.c b/src/inih/ini.c
index 6ad1f8d3..fddbdc15 100644
--- a/src/inih/ini.c
+++ b/src/inih/ini.c
@@ -17,7 +17,7 @@ https://github.com/benhoyt/inih
/* This is ocserv's addition; needed for our definitions
* to take precedence over defaults. */
-#include
+#include "config.h"
#include
#include
diff --git a/src/ip-lease.c b/src/ip-lease.c
index e7ba7631..e23a9657 100644
--- a/src/ip-lease.c
+++ b/src/ip-lease.c
@@ -15,16 +15,16 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
-#include
-#include
-#include
+#include "ip-lease.h"
+#include "main.h"
+#include "ip-util.h"
#include
-#include
+#include "icmp-ping.h"
#include
static void ip_from_seed(uint8_t *seed, unsigned int seed_size, void *ip,
diff --git a/src/ip-lease.h b/src/ip-lease.h
index 208172b9..6c028483 100644
--- a/src/ip-lease.h
+++ b/src/ip-lease.h
@@ -21,11 +21,11 @@
#ifndef OC_IP_LEASE_H
#define OC_IP_LEASE_H
-#include
+#include "vpn.h"
#include
#include
-#include
-#include
+#include "ccan/hash/hash.h"
+#include "main.h"
struct ip_lease_st {
/* In IPv4 this is the same as rip, in IPv6
diff --git a/src/ip-util.c b/src/ip-util.c
index eb8601b8..c30c3989 100644
--- a/src/ip-util.c
+++ b/src/ip-util.c
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include "ip-util.h"
#include "common/common.h"
#include
diff --git a/src/isolate.c b/src/isolate.c
index 342bd48b..be58c864 100644
--- a/src/isolate.c
+++ b/src/isolate.c
@@ -16,14 +16,14 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
#include
#include
-#include
-#include
+#include "worker.h"
+#include "main.h"
#include
#include
diff --git a/src/isolate.h b/src/isolate.h
index 4486626e..5489f6a8 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -15,7 +15,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-
#ifndef OC_ISOLATE_H
#define OC_ISOLATE_H
diff --git a/src/log.c b/src/log.c
index 7e1976cf..5318d91b 100644
--- a/src/log.c
+++ b/src/log.c
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include
#include
#include
@@ -24,10 +24,10 @@
#include
#include
#include
-#include
+#include "common/base64-helper.h"
-#include
-#include
+#include "worker.h"
+#include "main.h"
#include "sec-mod.h"
#include "log.h"
diff --git a/src/log.h b/src/log.h
index aea9bb34..613c6517 100644
--- a/src/log.h
+++ b/src/log.h
@@ -183,4 +183,4 @@ inline static unsigned int log_check_priority(int oc_priority, int log_prio,
return 1;
}
-#endif /* OC_LOG_H */
+#endif
diff --git a/src/lzs.c b/src/lzs.c
index fce1e969..01fdd18a 100644
--- a/src/lzs.c
+++ b/src/lzs.c
@@ -15,7 +15,7 @@
* Lesser General Public License for more details.
*/
-#include
+#include "config.h"
#include
#include
diff --git a/src/lzs.h b/src/lzs.h
index 6d8ea7a9..4962c4e2 100644
--- a/src/lzs.h
+++ b/src/lzs.h
@@ -14,7 +14,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
-
#ifndef OC_LZS_H
#define OC_LZS_H
diff --git a/src/main-auth.c b/src/main-auth.c
index 21286eb7..7ff0c39d 100644
--- a/src/main-auth.c
+++ b/src/main-auth.c
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include
+#include "config.h"
#include