app-emulation/wa-linux-agent: backport sudoers fix

This commit is contained in:
Alex Crawford 2016-06-20 16:40:47 -07:00
parent a2bbe80d7a
commit 82b91880da
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,22 @@
From 0dc86a2df78b6c80de0533fcfac14a49716f5435 Mon Sep 17 00:00:00 2001
From: Eric Williams <eric@subcritical.org>
Date: Sun, 19 Jun 2016 10:28:05 +0100
Subject: [PATCH] Fix sudo asking for password
---
azurelinuxagent/distro/default/osutil.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/azurelinuxagent/distro/default/osutil.py b/azurelinuxagent/distro/default/osutil.py
index 18ab2ba..1685f31 100644
--- a/azurelinuxagent/distro/default/osutil.py
+++ b/azurelinuxagent/distro/default/osutil.py
@@ -124,7 +124,7 @@ def conf_sudoer(self, username, nopasswd):
fileutil.append_file('/etc/sudoers', sudoers)
sudoer = None
if nopasswd:
- sudoer = "{0} ALL = (ALL) NOPASSWD\n".format(username)
+ sudoer = "{0} ALL = (ALL) NOPASSWD: ALL\n".format(username)
else:
sudoer = "{0} ALL = (ALL) ALL\n".format(username)
fileutil.append_file('/etc/sudoers.d/waagent', sudoer)

View File

@ -14,6 +14,10 @@ IUSE=""
RDEPEND="dev-lang/python-oem"
PATCHES=(
"${FILESDIR}/0001-fix-sudo-asking-for-password.patch"
)
S="${WORKDIR}/WALinuxAgent-${PV}"
src_install() {