summaryrefslogtreecommitdiff
path: root/package/sudo
diff options
context:
space:
mode:
Diffstat (limited to 'package/sudo')
-rw-r--r--package/sudo/Makefile14
-rw-r--r--package/sudo/patches/patch-compat_Makefile_in15
-rw-r--r--package/sudo/patches/patch-doc_Makefile_in27
-rw-r--r--package/sudo/patches/patch-include_Makefile_in11
-rw-r--r--package/sudo/patches/patch-lib_util_Makefile_in15
-rw-r--r--package/sudo/patches/patch-plugins_sudoers_Makefile_in31
-rw-r--r--package/sudo/patches/patch-plugins_sudoers_match_c14
-rw-r--r--package/sudo/patches/patch-src_Makefile_in23
8 files changed, 123 insertions, 27 deletions
diff --git a/package/sudo/Makefile b/package/sudo/Makefile
index 63514b459..8c8a1fe30 100644
--- a/package/sudo/Makefile
+++ b/package/sudo/Makefile
@@ -4,13 +4,13 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= sudo
-PKG_VERSION:= 1.8.10
-PKG_RELEASE:= 3
-PKG_MD5SUM:= 954d64906c3f6e2436f33445a049c58b
+PKG_VERSION:= 1.8.11p2
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 84012b4871b6c775c957cd310d5bad87
PKG_DESCR:= su do
PKG_SECTION:= sys/misc
-PKG_URL:= http://www.courtesan.com/sudo/
-PKG_SITES:= http://www.courtesan.com/sudo/dist/
+PKG_URL:= http://www.sudo.ws/sudo/
+PKG_SITES:= http://www.sudo.ws/sudo/dist/
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
@@ -19,8 +19,12 @@ include $(ADK_TOPDIR)/mk/package.mk
$(eval $(call PKG_template,SUDO,sudo,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
HOST_CPPFLAGS+= -I../ -I../include
+TARGET_LDFLAGS+= -ldl
CONFIGURE_ARGS+= --without-pam \
--without-sendmail \
+ --disable-shared \
+ --enable-static-sudoers \
+ --disable-shared-libutil \
--with-env-editor
ifeq ($(ADK_TARGET_USE_SSP),y)
diff --git a/package/sudo/patches/patch-compat_Makefile_in b/package/sudo/patches/patch-compat_Makefile_in
deleted file mode 100644
index e52c8a62c..000000000
--- a/package/sudo/patches/patch-compat_Makefile_in
+++ /dev/null
@@ -1,15 +0,0 @@
---- sudo-1.8.10.orig/compat/Makefile.in 2014-03-07 22:51:19.000000000 +0100
-+++ sudo-1.8.10/compat/Makefile.in 2014-03-24 15:58:28.000000000 +0100
-@@ -96,10 +96,10 @@ signame.c: mksigname
- ./mksigname > $@
-
- mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/missing.h $(top_builddir)/config.h
-- $(CC) $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
-+ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
-
- mksigname: $(srcdir)/mksigname.c $(srcdir)/mksigname.h $(incdir)/missing.h $(top_builddir)/config.h
-- $(CC) $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/mksigname.c -o $@
-+ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/mksigname.c -o $@
-
- fnm_test: fnm_test.o libreplace.la
- $(LIBTOOL) --mode=link $(CC) -o $@ fnm_test.o libreplace.la $(PIE_LDFLAGS) $(SSP_LDFLAGS)
diff --git a/package/sudo/patches/patch-doc_Makefile_in b/package/sudo/patches/patch-doc_Makefile_in
new file mode 100644
index 000000000..32fca89be
--- /dev/null
+++ b/package/sudo/patches/patch-doc_Makefile_in
@@ -0,0 +1,27 @@
+--- sudo-1.8.11p2.orig/doc/Makefile.in 2014-09-23 18:40:15.000000000 +0200
++++ sudo-1.8.11p2/doc/Makefile.in 2014-12-15 13:42:40.626160940 +0100
+@@ -291,15 +291,15 @@ install-binaries:
+ install-includes:
+
+ install-doc: install-dirs
+- for f in $(OTHER_DOCS); do $(INSTALL) $(INSTALL_OWNER) -m 0644 $$f $(DESTDIR)$(docdir); done
+- @LDAP@for f in $(OTHER_DOCS_LDAP); do $(INSTALL) $(INSTALL_OWNER) -m 0644 $$f $(DESTDIR)$(docdir); done
+- $(INSTALL) $(INSTALL_OWNER) -m 0644 $(mansrcdir)/sudo.$(mantype) $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)
+- $(INSTALL) $(INSTALL_OWNER) -m 0644 $(mansrcdir)/sudo_plugin.$(mantype) $(DESTDIR)$(mandirsu)/sudo_plugin.$(mansectsu)
+- $(INSTALL) $(INSTALL_OWNER) -m 0644 $(mansrcdir)/sudoreplay.$(mantype) $(DESTDIR)$(mandirsu)/sudoreplay.$(mansectsu)
+- $(INSTALL) $(INSTALL_OWNER) -m 0644 $(mansrcdir)/visudo.$(mantype) $(DESTDIR)$(mandirsu)/visudo.$(mansectsu)
+- $(INSTALL) $(INSTALL_OWNER) -m 0644 $(mansrcdir)/sudo.conf.$(mantype) $(DESTDIR)$(mandirform)/sudo.conf.$(mansectform)
+- $(INSTALL) $(INSTALL_OWNER) -m 0644 $(mansrcdir)/sudoers.$(mantype) $(DESTDIR)$(mandirform)/sudoers.$(mansectform)
+- @LDAP@$(INSTALL) $(INSTALL_OWNER) -m 0644 $(mansrcdir)/sudoers.ldap.$(mantype) $(DESTDIR)$(mandirform)/sudoers.ldap.$(mansectform)
++ for f in $(OTHER_DOCS); do $(INSTALL) -m 0644 $$f $(DESTDIR)$(docdir); done
++ @LDAP@for f in $(OTHER_DOCS_LDAP); do $(INSTALL) -m 0644 $$f $(DESTDIR)$(docdir); done
++ $(INSTALL) -m 0644 $(mansrcdir)/sudo.$(mantype) $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)
++ $(INSTALL) -m 0644 $(mansrcdir)/sudo_plugin.$(mantype) $(DESTDIR)$(mandirsu)/sudo_plugin.$(mansectsu)
++ $(INSTALL) -m 0644 $(mansrcdir)/sudoreplay.$(mantype) $(DESTDIR)$(mandirsu)/sudoreplay.$(mansectsu)
++ $(INSTALL) -m 0644 $(mansrcdir)/visudo.$(mantype) $(DESTDIR)$(mandirsu)/visudo.$(mansectsu)
++ $(INSTALL) -m 0644 $(mansrcdir)/sudo.conf.$(mantype) $(DESTDIR)$(mandirform)/sudo.conf.$(mansectform)
++ $(INSTALL) -m 0644 $(mansrcdir)/sudoers.$(mantype) $(DESTDIR)$(mandirform)/sudoers.$(mansectform)
++ @LDAP@$(INSTALL) -m 0644 $(mansrcdir)/sudoers.ldap.$(mantype) $(DESTDIR)$(mandirform)/sudoers.ldap.$(mansectform)
+ @if test -n "$(MANCOMPRESS)"; then \
+ for f in $(mandirsu)/sudo.$(mansectsu) $(mandirsu)/sudo_plugin.$(mansectsu) $(mandirsu)/sudoreplay.$(mansectsu) $(mandirsu)/visudo.$(mansectsu) $(mandirform)/sudo.conf.$(mansectform) $(mandirform)/sudoers.$(mansectform) $(mandirform)/sudoers.ldap.$(mansectform); do \
+ if test -f $(DESTDIR)$$f; then \
diff --git a/package/sudo/patches/patch-include_Makefile_in b/package/sudo/patches/patch-include_Makefile_in
new file mode 100644
index 000000000..bb07fa867
--- /dev/null
+++ b/package/sudo/patches/patch-include_Makefile_in
@@ -0,0 +1,11 @@
+--- sudo-1.8.11p2.orig/include/Makefile.in 2014-10-07 22:26:20.000000000 +0200
++++ sudo-1.8.11p2/include/Makefile.in 2014-12-15 13:06:08.966174328 +0100
+@@ -66,7 +66,7 @@ install-binaries:
+ install-doc:
+
+ install-includes: install-dirs
+- $(INSTALL) $(INSTALL_OWNER) -m 0644 $(srcdir)/sudo_plugin.h $(DESTDIR)$(includedir)
++ $(INSTALL) -m 0644 $(srcdir)/sudo_plugin.h $(DESTDIR)$(includedir)
+
+ install-plugin:
+
diff --git a/package/sudo/patches/patch-lib_util_Makefile_in b/package/sudo/patches/patch-lib_util_Makefile_in
new file mode 100644
index 000000000..696e40b48
--- /dev/null
+++ b/package/sudo/patches/patch-lib_util_Makefile_in
@@ -0,0 +1,15 @@
+--- sudo-1.8.11p2.orig/lib/util/Makefile.in 2014-10-07 22:26:20.000000000 +0200
++++ sudo-1.8.11p2/lib/util/Makefile.in 2014-12-15 11:39:13.098206188 +0100
+@@ -148,10 +148,10 @@ signame.c: mksigname
+ ./mksigname > $@
+
+ mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/sudo_compat.h $(top_builddir)/config.h
+- $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
++ $(CC_FOR_BUILD) -I$(top_builddir) -I$(srcdir) -I$(top_srcdir) -I$(incdir) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFS) $(srcdir)/mksiglist.c -o $@
+
+ mksigname: $(srcdir)/mksigname.c $(srcdir)/mksigname.h $(incdir)/sudo_compat.h $(top_builddir)/config.h
+- $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksigname.c -o $@
++ $(CC_FOR_BUILD) -I$(top_builddir) -I$(srcdir) -I$(top_srcdir) -I$(incdir) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(DEFS) $(srcdir)/mksigname.c -o $@
+
+ $(srcdir)/mksiglist.h: $(srcdir)/siglist.in
+ @if [ -n "$(DEVEL)" ]; then \
diff --git a/package/sudo/patches/patch-plugins_sudoers_Makefile_in b/package/sudo/patches/patch-plugins_sudoers_Makefile_in
new file mode 100644
index 000000000..b2067ef04
--- /dev/null
+++ b/package/sudo/patches/patch-plugins_sudoers_Makefile_in
@@ -0,0 +1,31 @@
+--- sudo-1.8.11p2.orig/plugins/sudoers/Makefile.in 2014-10-07 22:26:20.000000000 +0200
++++ sudo-1.8.11p2/plugins/sudoers/Makefile.in 2014-12-15 12:59:33.342176744 +0100
+@@ -301,12 +301,12 @@ install-dirs:
+ $(DESTDIR)$(sudoersdir) $(DESTDIR)$(docdir) \
+ `echo $(DESTDIR)$(rundir)|$(SED) 's,/[^/]*$$,,'` \
+ `echo $(DESTDIR)$(vardir)|$(SED) 's,/[^/]*$$,,'`
+- $(INSTALL) -d $(INSTALL_OWNER) -m 0711 $(DESTDIR)$(rundir)
+- $(INSTALL) -d $(INSTALL_OWNER) -m 0711 $(DESTDIR)$(vardir)
++ $(INSTALL) -d $(DESTDIR)$(rundir)
++ $(INSTALL) -d $(DESTDIR)$(vardir)
+
+ install-binaries: visudo sudoreplay install-dirs
+- INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 0755 sudoreplay $(DESTDIR)$(replaydir)/sudoreplay
+- INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 0755 visudo $(DESTDIR)$(visudodir)/visudo
++ INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) -m 0755 sudoreplay $(DESTDIR)$(replaydir)/sudoreplay
++ INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) -m 0755 visudo $(DESTDIR)$(visudodir)/visudo
+
+ install-includes:
+
+@@ -322,9 +322,9 @@ install-plugin: sudoers.la install-dirs
+ esac
+
+ install-sudoers: install-dirs
+- $(INSTALL) -d $(INSTALL_OWNER) -m 0750 $(DESTDIR)$(sudoersdir)/sudoers.d
++ $(INSTALL) -d -m 0750 $(DESTDIR)$(sudoersdir)/sudoers.d
+ test -r $(DESTDIR)$(sudoersdir)/sudoers || \
+- $(INSTALL) $(INSTALL_OWNER) -m $(sudoers_mode) sudoers $(DESTDIR)$(sudoersdir)/sudoers
++ $(INSTALL) -m $(sudoers_mode) sudoers $(DESTDIR)$(sudoersdir)/sudoers
+
+ uninstall:
+ -$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(plugindir)/sudoers.la
diff --git a/package/sudo/patches/patch-plugins_sudoers_match_c b/package/sudo/patches/patch-plugins_sudoers_match_c
index 57c49e55b..88fe5986c 100644
--- a/package/sudo/patches/patch-plugins_sudoers_match_c
+++ b/package/sudo/patches/patch-plugins_sudoers_match_c
@@ -1,6 +1,6 @@
---- sudo-1.8.10.orig/plugins/sudoers/match.c 2014-03-07 22:51:19.000000000 +0100
-+++ sudo-1.8.10/plugins/sudoers/match.c 2014-03-24 16:16:24.000000000 +0100
-@@ -122,10 +122,12 @@ userlist_matches(const struct passwd *pw
+--- sudo-1.8.11p2.orig/plugins/sudoers/match.c 2014-09-23 18:56:04.000000000 +0200
++++ sudo-1.8.11p2/plugins/sudoers/match.c 2014-12-15 10:26:02.230233008 +0100
+@@ -126,10 +126,12 @@ userlist_matches(const struct passwd *pw
case ALL:
matched = !m->negated;
break;
@@ -13,7 +13,7 @@
case USERGROUP:
if (usergr_matches(m->name, pw->pw_name, pw))
matched = !m->negated;
-@@ -178,10 +180,12 @@ runaslist_matches(const struct member_li
+@@ -182,10 +184,12 @@ runaslist_matches(const struct member_li
case ALL:
user_matched = !m->negated;
break;
@@ -26,7 +26,7 @@
case USERGROUP:
if (usergr_matches(m->name, runas_pw->pw_name, runas_pw))
user_matched = !m->negated;
-@@ -278,10 +282,12 @@ hostlist_matches(const struct member_lis
+@@ -282,10 +286,12 @@ hostlist_matches(const struct member_lis
case ALL:
matched = !m->negated;
break;
@@ -39,7 +39,7 @@
case NTWKADDR:
if (addr_matches(m->name))
matched = !m->negated;
-@@ -930,6 +936,7 @@ sudo_getdomainname(void)
+@@ -939,6 +945,7 @@ sudo_getdomainname(void)
* else return false. Either of "lhost", "shost" or "user" may be NULL
* in which case that argument is not checked...
*/
@@ -47,7 +47,7 @@
bool
netgr_matches(const char *netgr, const char *lhost, const char *shost, const char *user)
{
-@@ -972,3 +979,4 @@ netgr_matches(const char *netgr, const c
+@@ -981,3 +988,4 @@ netgr_matches(const char *netgr, const c
debug_return_bool(rc);
}
diff --git a/package/sudo/patches/patch-src_Makefile_in b/package/sudo/patches/patch-src_Makefile_in
new file mode 100644
index 000000000..4379371f6
--- /dev/null
+++ b/package/sudo/patches/patch-src_Makefile_in
@@ -0,0 +1,23 @@
+--- sudo-1.8.11p2.orig/src/Makefile.in 2014-10-07 22:26:20.000000000 +0200
++++ sudo-1.8.11p2/src/Makefile.in 2014-12-15 13:03:47.830175190 +0100
+@@ -151,17 +151,17 @@ install-rc:
+ @if [ -n "$(INIT_SCRIPT)" ]; then \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(INIT_DIR) \
+ `echo $(DESTDIR)$(RC_LINK) | $(SED) 's,/[^/]*$$,,'`; \
+- $(INSTALL) $(INSTALL_OWNER) -m 0755 $(top_srcdir)/init.d/$(INIT_SCRIPT) $(DESTDIR)$(INIT_DIR)/sudo; \
++ $(INSTALL) -m 0755 $(top_srcdir)/init.d/$(INIT_SCRIPT) $(DESTDIR)$(INIT_DIR)/sudo; \
+ rm -f $(DESTDIR)$(RC_LINK); \
+ ln -s $(INIT_DIR)/sudo $(DESTDIR)$(RC_LINK); \
+ fi
+
+ install-binaries: install-dirs $(PROGS)
+- INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 04755 sudo $(DESTDIR)$(bindir)/sudo
++ INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) -m 0755 sudo $(DESTDIR)$(bindir)/sudo
+ rm -f $(DESTDIR)$(bindir)/sudoedit
+ ln -s sudo $(DESTDIR)$(bindir)/sudoedit
+ if [ -f sesh ]; then \
+- INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 0755 sesh $(DESTDIR)$(libexecdir)/sudo/sesh; \
++ INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) -m 0755 sesh $(DESTDIR)$(libexecdir)/sudo/sesh; \
+ fi
+
+ install-doc: