opendoas

my fork of doas with custom prompt
git clone git://git.kocotian.pl/opendoas.git
Log | Files | Refs | README | LICENSE

commit 0a42dd6437c3c056e8e5c99096ce7e060cabcc0d
parent 22b68970dd6a3f5018bbf3e68a5f9e35d5948c2e
Author: Duncan Overbruck <mail@duncano.de>
Date:   Thu, 12 Nov 2020 16:17:42 +0100

remove includes.h and move the prototypes to doas.h

Diffstat:
Mdoas.c | 2+-
Mdoas.h | 14++++++++++++++
Menv.c | 2+-
Dincludes.h | 20--------------------
Mlibopenbsd/sys-readpassphrase.h | 2--
Mpam.c | 3++-
Mshadow.c | 1+
Mtimestamp.c | 3++-
8 files changed, 21 insertions(+), 26 deletions(-)

diff --git a/doas.c b/doas.c @@ -36,7 +36,7 @@ #include <errno.h> #include <fcntl.h> -#include "includes.h" +#include "openbsd.h" #include "doas.h" static void __dead diff --git 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 @@ -28,8 +28,8 @@ #include <errno.h> #include <pwd.h> +#include "openbsd.h" #include "doas.h" -#include "includes.h" const char *formerpath; diff --git a/includes.h b/includes.h @@ -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 @@ -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 @@ -37,7 +37,8 @@ #include <security/pam_appl.h> -#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 @@ -35,6 +35,7 @@ #include <unistd.h> #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 @@ -82,7 +82,8 @@ #include <time.h> #include <unistd.h> -#include "includes.h" +#include "openbsd.h" +#include "doas.h" #ifndef TIMESTAMP_DIR # define TIMESTAMP_DIR "/run/doas"