From 0a42dd6437c3c056e8e5c99096ce7e060cabcc0d Mon Sep 17 00:00:00 2001 From: Duncan Overbruck Date: Thu, 12 Nov 2020 16:17:42 +0100 Subject: [PATCH] remove includes.h and move the prototypes to doas.h --- doas.c | 2 +- doas.h | 14 ++++++++++++++ env.c | 2 +- includes.h | 20 -------------------- libopenbsd/sys-readpassphrase.h | 2 -- pam.c | 3 ++- shadow.c | 1 + timestamp.c | 3 ++- 8 files changed, 21 insertions(+), 26 deletions(-) delete mode 100644 includes.h diff --git a/doas.c b/doas.c index 5a969a0..a184650 100644 --- a/doas.c +++ b/doas.c @@ -36,7 +36,7 @@ #include #include -#include "includes.h" +#include "openbsd.h" #include "doas.h" static void __dead diff --git a/doas.h b/doas.h index de8dbe1..c38fca2 100644 --- a/doas.h +++ b/doas.h @@ -43,3 +43,17 @@ char **prepenv(const struct rule *, const struct passwd *, #define KEEPENV 0x2 #define PERSIST 0x4 #define NOLOG 0x8 + +#ifdef USE_PAM +void pamauth(const char *, const char *, int, int, int); +#endif + +#ifdef USE_SHADOW +void shadowauth(const char *, int); +#endif + +#ifdef USE_TIMESTAMP +int timestamp_open(int *, int); +int timestamp_set(int, int); +int timestamp_clear(void); +#endif diff --git a/env.c b/env.c index e022787..e2286fc 100644 --- a/env.c +++ b/env.c @@ -28,8 +28,8 @@ #include #include +#include "openbsd.h" #include "doas.h" -#include "includes.h" const char *formerpath; diff --git a/includes.h b/includes.h deleted file mode 100644 index 911d903..0000000 --- a/includes.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef INCLUDES_H -#define INCLUDES_H - -#include "openbsd.h" - -#ifdef USE_PAM -void pamauth(const char *, const char *, int, int, int); -#endif - -#ifdef USE_SHADOW -void shadowauth(const char *, int); -#endif - -#ifdef USE_TIMESTAMP -int timestamp_open(int *, int); -int timestamp_set(int, int); -int timestamp_clear(void); -#endif - -#endif /* INCLUDES_H */ diff --git a/libopenbsd/sys-readpassphrase.h b/libopenbsd/sys-readpassphrase.h index 5fd7c5d..0c4a59e 100644 --- a/libopenbsd/sys-readpassphrase.h +++ b/libopenbsd/sys-readpassphrase.h @@ -25,8 +25,6 @@ #ifndef _READPASSPHRASE_H_ #define _READPASSPHRASE_H_ -#include "includes.h" - #ifndef HAVE_READPASSPHRASE #define RPP_ECHO_OFF 0x00 /* Turn off echo (default). */ diff --git a/pam.c b/pam.c index b921069..c6f63f2 100644 --- a/pam.c +++ b/pam.c @@ -37,7 +37,8 @@ #include -#include "includes.h" +#include "openbsd.h" +#include "doas.h" #ifndef HOST_NAME_MAX #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX diff --git a/shadow.c b/shadow.c index 8489017..27053d3 100644 --- a/shadow.c +++ b/shadow.c @@ -35,6 +35,7 @@ #include #include "openbsd.h" +#include "doas.h" #ifndef HOST_NAME_MAX #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX diff --git a/timestamp.c b/timestamp.c index c3606ee..bca260d 100644 --- a/timestamp.c +++ b/timestamp.c @@ -82,7 +82,8 @@ #include #include -#include "includes.h" +#include "openbsd.h" +#include "doas.h" #ifndef TIMESTAMP_DIR # define TIMESTAMP_DIR "/run/doas" -- 2.39.2