]> git.armaanb.net Git - opendoas.git/commitdiff
use config.h and link objects instead of libopenbsd.a
authorDuncan Overbruck <mail@duncano.de>
Thu, 12 Nov 2020 15:11:40 +0000 (16:11 +0100)
committerDuncan Overbruck <mail@duncano.de>
Thu, 12 Nov 2020 16:23:46 +0000 (17:23 +0100)
21 files changed:
.gitignore
bsd.prog.mk
configure
doas.c
env.c
libopenbsd/bsd-setres_id.c
libopenbsd/closefrom.c
libopenbsd/errc.c
libopenbsd/explicit_bzero.c
libopenbsd/openbsd.h
libopenbsd/progname.c
libopenbsd/readpassphrase.c
libopenbsd/reallocarray.c
libopenbsd/strlcat.c
libopenbsd/strlcpy.c
libopenbsd/strtonum.c
libopenbsd/verrc.c
pam.c
parse.y
shadow.c
timestamp.c

index fe3a7aab5a2724cdfb431255d0c574c37dd3273f..a5224e90386279ca6254b813fc071a35154dd171 100644 (file)
@@ -11,3 +11,4 @@ version.h
 *.swo
 
 config.mk
 *.swo
 
 config.mk
+config.h
index ba6c1418d6cedbe1411fcd5a4a20188f732b60be..6441fd8e0d8dfa85c09770fcd426ba3f2d0b58f8 100644 (file)
@@ -6,16 +6,10 @@ CFLAGS  += -I${CURDIR}/libopenbsd ${COPTS} -MD -MP -Wno-unused-result
 
 include config.mk
 
 
 include config.mk
 
-CFLAGS += -DDOAS_CONF="\"${SYSCONFDIR}/doas.conf\""
-
-OPENBSD := $(addprefix libopenbsd/,${OPENBSD})
 OBJS    := ${SRCS:.y=.c}
 OBJS    := ${OBJS:.c=.o}
 
 OBJS    := ${SRCS:.y=.c}
 OBJS    := ${OBJS:.c=.o}
 
-libopenbsd.a: ${OPENBSD}
-       ${AR} -r $@ $?
-
-${PROG}: ${OBJS} libopenbsd.a
+${PROG}: ${OBJS}
        ${CC} ${CFLAGS} $^ -o $@ ${LDFLAGS}
 
 install: ${PROG} ${PAM_DOAS} ${MAN}
        ${CC} ${CFLAGS} $^ -o $@ ${LDFLAGS}
 
 install: ${PROG} ${PAM_DOAS} ${MAN}
@@ -38,14 +32,11 @@ uninstall:
        rm -f ${DESTDIR}${MANDIR}/man5/doas.conf.5
 
 clean:
        rm -f ${DESTDIR}${MANDIR}/man5/doas.conf.5
 
 clean:
-       rm -f libopenbsd.a
-       rm -f ${OPENBSD}
-       rm -f ${OPENBSD:.o=.d}
        rm -f ${OBJS}
        rm -f ${OBJS:.o=.d}
        rm -f ${PROG}
        rm -f parse.c
 
        rm -f ${OBJS}
        rm -f ${OBJS:.o=.d}
        rm -f ${PROG}
        rm -f parse.c
 
--include ${OBJS:.o=.d} ${OPENBSD:.o=.d}
+-include ${OBJS:.o=.d}
 
 .PHONY: default clean install uninstall
 
 .PHONY: default clean install uninstall
index 679fe68b2419fa15640df3770fccd64c4976b322..f9c2754927c49ba7ddbb0058e8272f7f04375c84 100755 (executable)
--- a/configure
+++ b/configure
@@ -72,7 +72,14 @@ for x; do
 done
 
 CONFIG_MK=config.mk
 done
 
 CONFIG_MK=config.mk
-rm -f "$CONFIG_MK"
+CONFIG_H=config.h
+rm -f "$CONFIG_MK" "$CONFIG_H"
+
+cat <<! >$CONFIG_H
+#ifndef CONFIG_H
+#define CONFIG_H
+
+!
 
 cat <<EOF >>$CONFIG_MK
 PREFIX   ?=    ${PREFIX:="/usr"}
 
 cat <<EOF >>$CONFIG_MK
 PREFIX   ?=    ${PREFIX:="/usr"}
@@ -111,10 +118,12 @@ OS_CFLAGS="-D__${OS}__"
 
 case "$OS" in
        linux)
 
 case "$OS" in
        linux)
-               OS_CFLAGS="$OS_CFLAGS -D_DEFAULT_SOURCE -D_GNU_SOURCE -DUID_MAX=${UID_MAX} -DGID_MAX=${GID_MAX}"
+               printf 'Setting UID_MAX\t\t\t\t%d.\n' "$UID_MAX" >&2
+               printf '#define UID_MAX %s\n' "$UID_MAX" >>$CONFIG_H
+               printf 'Setting GID_MAX\t\t\t\t%d.\n' "$GID_MAX" >&2
+               printf '#define GID_MAX %s\n' "$GID_MAX" >>$CONFIG_H
+               OS_CFLAGS="$OS_CFLAGS -D_DEFAULT_SOURCE -D_GNU_SOURCE"
                printf 'CURDIR   :=     .\n' >>$CONFIG_MK
                printf 'CURDIR   :=     .\n' >>$CONFIG_MK
-               [ -z "$WITHOUT_PAM" ] && \
-                       printf 'PAM_DOAS  =     pam.d__doas__linux\n' >>$CONFIG_MK
                ;;
 esac
 
                ;;
 esac
 
@@ -139,12 +148,13 @@ check_func() {
        $XCC "_$func.c" -o "_$func" 2>/dev/null
        ret=$?
        rm -f "_$func.c" "_$func"
        $XCC "_$func.c" -o "_$func" 2>/dev/null
        ret=$?
        rm -f "_$func.c" "_$func"
+       upperfunc="$(printf '%s\n' "$func" | tr '[[:lower:]]' '[[:upper:]]')"
        if [ $ret -eq 0 ]; then
                printf 'yes.\n' >&2
        if [ $ret -eq 0 ]; then
                printf 'yes.\n' >&2
-               upperfunc="$(printf '%s\n' "$func" | tr '[[:lower:]]' '[[:upper:]]')"
-               printf 'CFLAGS   +=     -DHAVE_%s\n' "$upperfunc" >>$CONFIG_MK
+               printf '#define HAVE_%s\n' "$upperfunc" >>$CONFIG_H
                return 0
        else
                return 0
        else
+               printf '/* #define HAVE_%s */\n' "$upperfunc" >>$CONFIG_H
                printf 'no.\n' >&2
                return 1
        fi
                printf 'no.\n' >&2
                return 1
        fi
@@ -162,8 +172,11 @@ int main(void) {
        [ -z "$WITHOUT_PAM" ] && check_func "pam_appl_h" "$src" && {
                printf 'SRCS     +=     pam.c\n' >>$CONFIG_MK
                printf 'LDFLAGS  +=     -lpam\n' >>$CONFIG_MK
        [ -z "$WITHOUT_PAM" ] && check_func "pam_appl_h" "$src" && {
                printf 'SRCS     +=     pam.c\n' >>$CONFIG_MK
                printf 'LDFLAGS  +=     -lpam\n' >>$CONFIG_MK
-               printf 'CPPFLAGS +=     -DUSE_PAM\n' >>$CONFIG_MK
+               printf '#define USE_PAM\n' >>$CONFIG_H
                printf 'pam\n'
                printf 'pam\n'
+
+               pam_file="pam.d__doas__${OS}"
+               [ -e "$pam_file" ] && printf 'PAM_DOAS  =       %s\n' "$pam_file" >>$CONFIG_MK
                return 0
        }
 
                return 0
        }
 
@@ -178,7 +191,7 @@ int main(void) {
        [ -z "$WITHOUT_SHADOW" ] && check_func "shadow_h" "$src" && {
                printf 'SRCS     +=     shadow.c\n' >>$CONFIG_MK
                printf 'LDFLAGS  +=     -lcrypt\n' >>$CONFIG_MK
        [ -z "$WITHOUT_SHADOW" ] && check_func "shadow_h" "$src" && {
                printf 'SRCS     +=     shadow.c\n' >>$CONFIG_MK
                printf 'LDFLAGS  +=     -lcrypt\n' >>$CONFIG_MK
-               printf 'CPPFLAGS +=     -DUSE_SHADOW\n' >>$CONFIG_MK
+               printf '#define USE_SHADOW\n' >>$CONFIG_H
                printf 'shadow\n'
                return 0
        }
                printf 'shadow\n'
                return 0
        }
@@ -188,7 +201,7 @@ int main(void) {
 
 persistmethod() {
        [ -z "$WITHOUT_TIMESTAMP" ] && {
 
 persistmethod() {
        [ -z "$WITHOUT_TIMESTAMP" ] && {
-               printf 'CPPFLAGS += -DUSE_TIMESTAMP\n' >>$CONFIG_MK
+               printf '#define USE_TIMESTAMP\n' >>$CONFIG_H
                printf 'SRCS    += timestamp.c\n' >>$CONFIG_MK
                printf 'timestamp\n'
                return 0
                printf 'SRCS    += timestamp.c\n' >>$CONFIG_MK
                printf 'timestamp\n'
                return 0
@@ -206,7 +219,7 @@ int main(void) {
        return 0;
 }'
 check_func "explicit_bzero" "$src" || {
        return 0;
 }'
 check_func "explicit_bzero" "$src" || {
-       printf 'OPENBSD  +=     explicit_bzero.o\n' >>$CONFIG_MK
+       printf 'SRCS += libopenbsd/explicit_bzero.c\n' >>$CONFIG_MK
 }
 
 #
 }
 
 #
@@ -221,7 +234,7 @@ int main(void) {
        return 0;
 }'
 check_func "strlcat" "$src" || {
        return 0;
 }'
 check_func "strlcat" "$src" || {
-       printf 'OPENBSD  +=     strlcat.o\n' >>$CONFIG_MK
+       printf 'SRCS += libopenbsd/strlcat.c\n' >>$CONFIG_MK
 }
 
 #
 }
 
 #
@@ -236,7 +249,7 @@ int main(void) {
        return 0;
 }'
 check_func "strlcpy" "$src" || {
        return 0;
 }'
 check_func "strlcpy" "$src" || {
-       printf 'OPENBSD  +=     strlcpy.o\n' >>$CONFIG_MK
+       printf 'SRCS += libopenbsd/strlcpy.c\n' >>$CONFIG_MK
 }
 
 #
 }
 
 #
@@ -249,7 +262,7 @@ int main(void) {
        return 0;
 }'
 check_func "errc" "$src" || {
        return 0;
 }'
 check_func "errc" "$src" || {
-       printf 'OPENBSD  +=     errc.o\n' >>$CONFIG_MK
+       printf 'SRCS += libopenbsd/errc.c\n' >>$CONFIG_MK
 }
 
 #
 }
 
 #
@@ -262,7 +275,7 @@ int main(void) {
        return 0;
 }'
 check_func "verrc" "$src" || {
        return 0;
 }'
 check_func "verrc" "$src" || {
-       printf 'OPENBSD  +=     verrc.o\n' >>$CONFIG_MK
+       printf 'SRCS += libopenbsd/verrc.c\n' >>$CONFIG_MK
 }
 
 #
 }
 
 #
@@ -275,7 +288,7 @@ int main(void) {
        return 0;
 }'
 check_func "setprogname" "$src" || {
        return 0;
 }'
 check_func "setprogname" "$src" || {
-       printf 'OPENBSD  +=     progname.o\n' >>$CONFIG_MK
+       printf 'SRCS += libopenbsd/progname.c\n' >>$CONFIG_MK
 }
 
 #
 }
 
 #
@@ -289,7 +302,7 @@ int main(void) {
        return 0;
 }'
 check_func "readpassphrase" "$src" || {
        return 0;
 }'
 check_func "readpassphrase" "$src" || {
-       printf 'OPENBSD  +=     readpassphrase.o\n' >>$CONFIG_MK
+       printf 'SRCS += libopenbsd/readpassphrase.c\n' >>$CONFIG_MK
 }
 
 #
 }
 
 #
@@ -303,7 +316,7 @@ int main(void) {
        return 0;
 }'
 check_func "strtonum" "$src" || {
        return 0;
 }'
 check_func "strtonum" "$src" || {
-       printf 'OPENBSD  +=     strtonum.o\n' >>$CONFIG_MK
+       printf 'SRCS += libopenbsd/strtonum.c\n' >>$CONFIG_MK
 }
 
 #
 }
 
 #
@@ -316,7 +329,7 @@ int main(void) {
        return 0;
 }'
 check_func "reallocarray" "$src" || {
        return 0;
 }'
 check_func "reallocarray" "$src" || {
-       printf 'OPENBSD  +=     reallocarray.o\n' >>$CONFIG_MK
+       printf 'SRCS += libopenbsd/reallocarray.c\n' >>$CONFIG_MK
 }
 
 #
 }
 
 #
@@ -341,7 +354,7 @@ int main(void) {
        return 0;
 }'
 check_func "setresuid" "$src" || {
        return 0;
 }'
 check_func "setresuid" "$src" || {
-       printf 'OPENBSD  +=     bsd-setres_id.o\n' >>$CONFIG_MK
+       printf 'SRCS += libopenbsd/bsd-setres_id.c\n' >>$CONFIG_MK
 }
 
 #
 }
 
 #
@@ -354,7 +367,7 @@ int main(void) {
        return 0;
 }'
 check_func "closefrom" "$src" || {
        return 0;
 }'
 check_func "closefrom" "$src" || {
-       printf 'OPENBSD  +=     closefrom.o\n' >>$CONFIG_MK
+       printf 'SRCS += libopenbsd/closefrom.c\n' >>$CONFIG_MK
 }
 
 #
 }
 
 #
@@ -368,17 +381,6 @@ int main(void) {
 }'
 check_func "sysconf" "$src"
 
 }'
 check_func "sysconf" "$src"
 
-#
-# Check for /proc/$PID.
-#
-printf 'Checking for %-14s\t\t' "/proc/\$PID ..." >&2
-if test -d /proc/$$; then
-       printf 'yes.\n' >&2
-       printf 'CFLAGS   +=     -DHAVE_%s\n' "PROC_PID" >>$CONFIG_MK
-else
-       printf 'no.\n' >&2
-fi
-
 #
 # Check for dirfd().
 #
 #
 # Check for dirfd().
 #
@@ -490,5 +492,7 @@ if [ $? -eq 0 ]; then
 else
        printf 'Using persist method\t\t\tnone.\n' >&2
 fi
 else
        printf 'Using persist method\t\t\tnone.\n' >&2
 fi
-printf 'Setting UID_MAX\t\t\t\t%d.\n' "$UID_MAX" >&2
-printf 'Setting GID_MAX\t\t\t\t%d.\n' "$GID_MAX" >&2
+
+printf '#define DOAS_CONF "%s/doas.conf"\n' "${SYSCONFDIR}" >>$CONFIG_H
+
+printf '\n#endif /* CONFIG_H */\n' >>$CONFIG_H
diff --git a/doas.c b/doas.c
index c95dee3b7af0ff87a9b0d22d1263037aa4a5967d..5a969a0834737800f9bb01d312ae37ab08085b5b 100644 (file)
--- a/doas.c
+++ b/doas.c
@@ -15,6 +15,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
diff --git a/env.c b/env.c
index 12909c6201cef0e9b1c0199cf13d641f89a152ad..e02278771e5060d190bb22a42a3dc8674c5586a3 100644 (file)
--- a/env.c
+++ b/env.c
@@ -15,6 +15,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include "sys-tree.h"
 
 #include <sys/types.h>
 #include "sys-tree.h"
 
index f36d3ebdf0af15d15e209c9a338e4b22455f1eed..c244b40d40092f0eb878200c892a3f6d872b6152 100644 (file)
@@ -14,7 +14,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include "includes.h"
+#include "config.h"
 
 #include <sys/types.h>
 
 
 #include <sys/types.h>
 
index 0d393530b4a6a80c9e2ec787f66ade0be667ebf9..5df58b83feea2715bdcc6f5129119529001aa470 100644 (file)
@@ -22,6 +22,8 @@
  * PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
  */
 
  * PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <unistd.h>
 #include <stdio.h>
index b82d4198f7f6da4e4dae5bd592dcc896b8104795..cab3e84c9da462b53960db12230b04654e163580 100644 (file)
  * SUCH DAMAGE.
  */
 
  * SUCH DAMAGE.
  */
 
-#include "includes.h"
+#include "config.h"
 
 #include <err.h>
 #include <stdarg.h>
 
 
 #include <err.h>
 #include <stdarg.h>
 
+#include "openbsd.h"
+
 void __dead
 errc(int eval, int code, const char *fmt, ...)
 {
 void __dead
 errc(int eval, int code, const char *fmt, ...)
 {
index 9a646c677832b43736a5fe1a61fbce6ca31f74da..2758e6c4685cc99cfe7f60e85cf7d8de59183294 100644 (file)
@@ -4,6 +4,8 @@
  * Written by Matthew Dempsky.
  */
 
  * Written by Matthew Dempsky.
  */
 
+#include "config.h"
+
 #include <string.h>
 
 #define __UNUSED __attribute__ ((unused))
 #include <string.h>
 
 #define __UNUSED __attribute__ ((unused))
index d3bdc0b61d58cf864c49753dde1bacf8b1228c88..1572b9c1c42f82517c7e4a6ddc599b8ce15e3bde 100644 (file)
@@ -14,9 +14,6 @@
 
 /* API definitions lifted from OpenBSD src/include */
 
 
 /* API definitions lifted from OpenBSD src/include */
 
-/* pwd.h */
-#define _PW_NAME_LEN 63
-
 /* stdlib.h */
 #ifndef HAVE_REALLOCARRAY
 void * reallocarray(void *optr, size_t nmemb, size_t size);
 /* stdlib.h */
 #ifndef HAVE_REALLOCARRAY
 void * reallocarray(void *optr, size_t nmemb, size_t size);
index 10c3701b5533a51f40b6447df356a95f6c8fbd58..acf496fa6505144967c14e11480a368cfa21c027 100644 (file)
@@ -30,6 +30,8 @@
  * <https://sourceware.org/ml/libc-alpha/2006-03/msg00125.html>.
  */
 
  * <https://sourceware.org/ml/libc-alpha/2006-03/msg00125.html>.
  */
 
+#include "config.h"
+
 #include <errno.h>
 #include <string.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
 #include <stdlib.h>
index 6862a5e91d9c01dd2490a922db16ff943b504a43..a283969f38bcbdd1e6b43c37b51556bb714fa648 100644 (file)
@@ -23,7 +23,7 @@
 
 /* OPENBSD ORIGINAL: lib/libc/gen/readpassphrase.c */
 
 
 /* OPENBSD ORIGINAL: lib/libc/gen/readpassphrase.c */
 
-#include "includes.h"
+#include "config.h"
 
 #ifndef HAVE_READPASSPHRASE
 
 
 #ifndef HAVE_READPASSPHRASE
 
index aa706868215d6fce5472e738486d9083311c3b09..7775fc60d118552365623cbaa8dda5208c41e10e 100644 (file)
@@ -15,6 +15,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <errno.h>
 #include <stdint.h>
 #include <sys/types.h>
 #include <errno.h>
 #include <stdint.h>
index 2596420eb4331e296a7c1c7fa9018826d234ffcb..68e1de652b1d3f73573f7854699805938d343653 100644 (file)
@@ -16,6 +16,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <string.h>
 
 #include <sys/types.h>
 #include <string.h>
 
index 630167489b3666db5f40df8d0e3668ab96dc8318..985c9ef250a82a90dfda4c75401a4fdb1d500b94 100644 (file)
@@ -16,6 +16,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <string.h>
 
 #include <sys/types.h>
 #include <string.h>
 
index 37251778baa608181f15af83f46efb807bd84ab4..b7ff28de84097541a21705c95354d80e19ea62f3 100644 (file)
@@ -17,6 +17,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "config.h"
+
 #include <errno.h>
 #include <limits.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <limits.h>
 #include <stdlib.h>
index c155a9208a46eec3e3d51e0d3e3b42ef3eba7312..c27320df9d4217ec301019e5598c6245eed6427e 100644 (file)
@@ -28,7 +28,7 @@
  * SUCH DAMAGE.
  */
 
  * SUCH DAMAGE.
  */
 
-#include "includes.h"
+#include "config.h"
 
 #include <err.h>
 #include <stdio.h>
 
 #include <err.h>
 #include <stdio.h>
@@ -36,6 +36,8 @@
 #include <string.h>
 #include <stdarg.h>
 
 #include <string.h>
 #include <stdarg.h>
 
+#include "openbsd.h"
+
 void __dead
 verrc(int eval, int code, const char *fmt, va_list ap)
 {
 void __dead
 verrc(int eval, int code, const char *fmt, va_list ap)
 {
diff --git a/pam.c b/pam.c
index 1fc608223d2ca25710fcd808075193f47e710565..ee02b0faab8fa43d7c48e28d2f9cf569e9d2b82f 100644 (file)
--- a/pam.c
+++ b/pam.c
@@ -14,6 +14,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/wait.h>
 
 #include <sys/types.h>
 #include <sys/wait.h>
 
diff --git a/parse.y b/parse.y
index 15c00c128ce11a1a9b9a5e693b358cc7b73393d6..f4309a3d0db0b61b95542b6e2dd03e4c20e787d3 100644 (file)
--- a/parse.y
+++ b/parse.y
@@ -16,6 +16,8 @@
  */
 
 %{
  */
 
 %{
+#include "config.h"
+
 #include <sys/types.h>
 #include <ctype.h>
 #include <err.h>
 #include <sys/types.h>
 #include <ctype.h>
 #include <err.h>
index 64cc1f740d0172172072b3bf90b0befe7cdf12e0..de53cea411d26598844f0fd40a4bb99f4830997a 100644 (file)
--- a/shadow.c
+++ b/shadow.c
@@ -1,3 +1,21 @@
+/*
+ * Copyright (c) 2020 Duncan Overbruck <mail@duncano.de>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "config.h"
+
 #if HAVE_CRYPT_H
 #      include <crypt.h>
 #endif
 #if HAVE_CRYPT_H
 #      include <crypt.h>
 #endif
index 6b4354cc868739305019023e4b445a7b5f09ad26..c3606ee7d8b45996124cc1eb3cc8a5b4a9a1be70 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (c) 2020 Duncan Overbruck <mail@duncano.de>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "config.h"
+
 /*
  * 1) Timestamp files and directories
  *
 /*
  * 1) Timestamp files and directories
  *