X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/5c389c5bedbcd462dfc416437e6c3d02c849091b..41b49f4ec6def1a5e838f0246c50be3db61aa818:/wizard/shell.py diff --git a/wizard/shell.py b/wizard/shell.py index d38ca15..94fe3cd 100644 --- a/wizard/shell.py +++ b/wizard/shell.py @@ -55,6 +55,9 @@ class Shell(object): uid = kwargs.pop("uid", None) kwargs.setdefault("python", is_python(args)) if not user and not uid: return self.call(*args, **kwargs) + if util.get_operator_name(): + # This might be generalized as "preserve some environment" + args.insert(0, "SSH_GSSAPI_NAME=" + util.get_operator_name()) if uid: return self.call("sudo", "-u", "#" + str(uid), *args, **kwargs) if user: return self.call("sudo", "-u", user, *args, **kwargs)