mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-24 16:01:09 +02:00
app-emulation/wa-linux-agent: backport sudoers fix
This commit is contained in:
parent
a2bbe80d7a
commit
82b91880da
@ -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)
|
@ -14,6 +14,10 @@ IUSE=""
|
|||||||
|
|
||||||
RDEPEND="dev-lang/python-oem"
|
RDEPEND="dev-lang/python-oem"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/0001-fix-sudo-asking-for-password.patch"
|
||||||
|
)
|
||||||
|
|
||||||
S="${WORKDIR}/WALinuxAgent-${PV}"
|
S="${WORKDIR}/WALinuxAgent-${PV}"
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
Loading…
x
Reference in New Issue
Block a user