summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2019-11-07 10:52:58 +0100
committerLars Wendler <polynomial-c@gentoo.org>2019-11-07 10:54:22 +0100
commitc11c2b56f0938b3f3c0d46c8b17af61bae075174 (patch)
treec9de8720fd67eda1c189e2616ba22f8c113f6c80 /app-admin/sudo
parentwww-client/opera: Old (diff)
downloadgentoo-c11c2b56f0938b3f3c0d46c8b17af61bae075174.tar.gz
gentoo-c11c2b56f0938b3f3c0d46c8b17af61bae075174.tar.bz2
gentoo-c11c2b56f0938b3f3c0d46c8b17af61bae075174.zip
app-admin/sudo: Revbumps to fix error message with USE="-pam"
Reported-by: Saul Peebsen <jaglover@gmail.com> Tested-by: Saul Peebsen <jaglover@gmail.com> Closes: https://bugs.gentoo.org/698946 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-admin/sudo')
-rw-r--r--app-admin/sudo/files/sudo-1.8.28-no_pam_error_message_fix.patch46
-rw-r--r--app-admin/sudo/sudo-1.8.28_p1-r2.ebuild (renamed from app-admin/sudo/sudo-1.8.28_p1-r1.ebuild)4
-rw-r--r--app-admin/sudo/sudo-1.8.29-r2.ebuild (renamed from app-admin/sudo/sudo-1.8.29-r1.ebuild)4
3 files changed, 54 insertions, 0 deletions
diff --git a/app-admin/sudo/files/sudo-1.8.28-no_pam_error_message_fix.patch b/app-admin/sudo/files/sudo-1.8.28-no_pam_error_message_fix.patch
new file mode 100644
index 000000000000..6931ea26c3b5
--- /dev/null
+++ b/app-admin/sudo/files/sudo-1.8.28-no_pam_error_message_fix.patch
@@ -0,0 +1,46 @@
+
+# HG changeset patch
+# User Todd C. Miller <Todd.Miller@sudo.ws>
+# Date 1573059314 25200
+# Node ID f85ff5ee2caf19cefca67ae49c1d6048d61125cb
+# Parent 5cdcfd9a6c33a157a12f1b1893e397c3198b206b
+Do not warn about a missing /etc/environment file on Linux without PAM.
+Bug #907
+
+diff -r 5cdcfd9a6c33 -r f85ff5ee2caf plugins/sudoers/env.c
+--- a/plugins/sudoers/env.c Tue Nov 05 15:18:34 2019 -0700
++++ b/plugins/sudoers/env.c Wed Nov 06 09:55:14 2019 -0700
+@@ -940,7 +940,8 @@
+ #endif /* HAVE_LOGIN_CAP_H */
+ #if defined(_AIX) || (defined(__linux__) && !defined(HAVE_PAM))
+ /* Insert system-wide environment variables. */
+- read_env_file(_PATH_ENVIRONMENT, true, false);
++ if (!read_env_file(_PATH_ENVIRONMENT, true, false))
++ sudo_warn("%s", _PATH_ENVIRONMENT);
+ #endif
+ for (ep = env.envp; *ep; ep++)
+ env_update_didvar(*ep, &didvar);
+@@ -1218,8 +1219,10 @@
+ efl = calloc(1, sizeof(*efl));
+ if (efl != NULL) {
+ if ((efl->fp = fopen(path, "r")) == NULL) {
+- free(efl);
+- efl = NULL;
++ if (errno != ENOENT) {
++ free(efl);
++ efl = NULL;
++ }
+ }
+ }
+ debug_return_ptr(efl);
+@@ -1259,6 +1262,9 @@
+ debug_decl(env_file_next_local, SUDOERS_DEBUG_ENV)
+
+ *errnum = 0;
++ if (efl->fp == NULL)
++ debug_return_ptr(NULL);
++
+ for (;;) {
+ if (sudo_parseln(&efl->line, &efl->linesize, NULL, efl->fp, PARSELN_CONT_IGN) == -1) {
+ if (!feof(efl->fp))
+
diff --git a/app-admin/sudo/sudo-1.8.28_p1-r1.ebuild b/app-admin/sudo/sudo-1.8.28_p1-r2.ebuild
index 06397f8cdcbe..4c371226f1df 100644
--- a/app-admin/sudo/sudo-1.8.28_p1-r1.ebuild
+++ b/app-admin/sudo/sudo-1.8.28_p1-r2.ebuild
@@ -75,6 +75,10 @@ REQUIRED_USE="
MAKEOPTS+=" SAMPLES="
+PATCHES=(
+ "${FILESDIR}/${PN}-1.8.28-no_pam_error_message_fix.patch" #698946
+)
+
src_prepare() {
default
elibtoolize
diff --git a/app-admin/sudo/sudo-1.8.29-r1.ebuild b/app-admin/sudo/sudo-1.8.29-r2.ebuild
index 4aba6ef09a1a..3f019d90fd06 100644
--- a/app-admin/sudo/sudo-1.8.29-r1.ebuild
+++ b/app-admin/sudo/sudo-1.8.29-r2.ebuild
@@ -75,6 +75,10 @@ REQUIRED_USE="
MAKEOPTS+=" SAMPLES="
+PATCHES=(
+ "${FILESDIR}/${PN}-1.8.28-no_pam_error_message_fix.patch" #698946
+)
+
src_prepare() {
default
elibtoolize