Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379186 )

Change subject: fab: change sudo prefix
......................................................................

fab: change sudo prefix

'sudo -ni' makes sudo to start a login shell and pass the command to the
shell with '-c'.

Hence:
   sudo('foo')

Ends up as:

  /bin/bash -c foo

That is not matched by the sudo rules and causes troubles.

Instead, have sudo set the target user $HOME environment variable
instead of using the invoker $HOME.

Bug: T167845
Change-Id: If96cc82d7fb773310833e8e2c8bf448c8690191d
---
M fabfile.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/86/379186/1

diff --git a/fabfile.py b/fabfile.py
index 7747120..e32b8c5 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -13,7 +13,7 @@
 from fabric.api import *  # noqa
 from fabric.contrib.console import confirm
 
-env.sudo_prefix = 'sudo -ni '
+env.sudo_prefix = 'sudo -H '
 env.use_ssh_config = True
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/379186
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If96cc82d7fb773310833e8e2c8bf448c8690191d
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar <has...@free.fr>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to