summaryrefslogtreecommitdiff
path: root/security/sudo/patches/patch-ag
blob: dc13ec6e740dd1a3c08957795594fd1f2f136c9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
$NetBSD: patch-ag,v 1.22 2014/03/08 11:51:56 kim Exp $

* Add "--with-nbsdops" option, NetBSD standard options.
* Link with util(3) in the case of DragonFly, too.
* When specified "--with-kerb5" option, test existence of several functions
  even if there is krb5-config.  krb5-config dosen't give all definitions for
  functions (HAVE_KRB5_*).
* Remove setting sysconfdir to "/etc".

--- configure.orig	2014-03-05 08:09:14.000000000 -0500
+++ configure	2014-03-08 06:35:19.000000000 -0500
@@ -1484,7 +1484,7 @@
   --bindir=DIR            user executables [EPREFIX/bin]
   --sbindir=DIR           system admin executables [EPREFIX/sbin]
   --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        read-only single-machine data [/etc]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
   --libdir=DIR            object code libraries [EPREFIX/lib]
@@ -1569,6 +1569,7 @@
   --with-libraries        additional libraries to link with
   --with-efence           link with -lefence for malloc() debugging
   --with-csops            add CSOps standard options
+  --with-nbsdops          add NetBSD standard options
   --without-passwd        don't use passwd/shadow file for authentication
   --with-skey=DIR         enable S/Key support
   --with-opie=DIR         enable OPIE support
@@ -3959,6 +3960,22 @@
 esac
 fi
 
+# Check whether --with-nbsdops or --without-nbsdops was given.
+if test "${with_nbsdops+set}" = set; then
+  withval="$with_nbsdops"
+  case $with_nbsdops in
+    yes)	echo 'Adding NetBSD standard options'
+		CHECKSIA=false
+		with_ignore_dot=yes
+		with_env_editor=yes
+		with_tty_tickets=yes
+		;;
+    no)		;;
+    *)		echo "Ignoring unknown argument to --with-nbsdops: $with_nbsdops"
+		;;
+esac
+fi;
+
 
 
 # Check whether --with-passwd was given.
@@ -14244,7 +14261,7 @@
 		: ${mansectsu='1m'}
 		: ${mansectform='4'}
 		;;
-    *-*-linux*|*-*-k*bsd*-gnu)
+    *-*-linux*|*-*-k*bsd*-gnu|*-*-gnukfreebsd)
 		OSDEFS="${OSDEFS} -D_GNU_SOURCE"
 		# Some Linux versions need to link with -lshadow
 		shadow_funcs="getspnam"
@@ -15643,7 +15660,7 @@
 _ACEOF
  LOGINCAP_USAGE='[-c class|-] '; LCMAN=1
 	case "$OS" in
-	    freebsd|netbsd)	SUDO_LIBS="${SUDO_LIBS} -lutil"
+	    dragonfly*|freebsd*|netbsd*)	SUDO_LIBS="${SUDO_LIBS} -lutil"
 	    ;;
 	esac
 
@@ -18580,6 +18597,8 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 	AUTH_OBJS="$AUTH_OBJS kerb5.o"
     fi
+fi
+if test ${with_kerb5-'no'} != "no"; then
     _LIBS="$LIBS"
     LIBS="${LIBS} ${SUDO_LIBS}"
     for ac_func in krb5_verify_user krb5_init_secure_context
@@ -20324,7 +20343,6 @@
 test "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)'
 test "$localedir" = '${datarootdir}/locale' && localedir='$(datarootdir)/locale'
 test "$localstatedir" = '${prefix}/var' && localstatedir='$(prefix)/var'
-test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/etc'
 
 ac_config_files="$ac_config_files Makefile sudo_usage.h sudoers"