]> git.armaanb.net Git - opendoas.git/commitdiff
remove includes.h and move the prototypes to doas.h
authorDuncan Overbruck <mail@duncano.de>
Thu, 12 Nov 2020 15:17:42 +0000 (16:17 +0100)
committerDuncan Overbruck <mail@duncano.de>
Thu, 12 Nov 2020 21:29:08 +0000 (22:29 +0100)
doas.c
doas.h
env.c
includes.h [deleted file]
libopenbsd/sys-readpassphrase.h
pam.c
shadow.c
timestamp.c

diff --git a/doas.c b/doas.c
index 5a969a0834737800f9bb01d312ae37ab08085b5b..a184650ba38ea9b4f8c781fd791a869efee32dc1 100644 (file)
--- 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
index de8dbe1c18495cd5fab1d3fe1eeddce8ac16d0aa..c38fca2de968c017516d847c43b76768237c2384 100644 (file)
--- 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 e02278771e5060d190bb22a42a3dc8674c5586a3..e2286fc83b0232425f67a8cda355ef1453f7739f 100644 (file)
--- 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
deleted file mode 100644 (file)
index 911d903..0000000
+++ /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 */
index 5fd7c5d77abae60c782359031f79956f10248840..0c4a59e5ff9aebf60b531d4a25024c8d73ec3313 100644 (file)
@@ -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 b921069b195a8a4d89b714f07d264bcc50cfb4d5..c6f63f2f516dbdfd181da204db9e302b50a6fecd 100644 (file)
--- 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
index 8489017b167516835bf03d7102bbb4dcdee63996..27053d3a5ac5aae941867b6409910ee5dcfc9d2f 100644 (file)
--- 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
index c3606ee7d8b45996124cc1eb3cc8a5b4a9a1be70..bca260d1071f3f2436708c4aa6c1588567c9b009 100644 (file)
@@ -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"