From 258316ca7218222a940a89bae637f59a342a7571 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 14 Feb 2017 15:05:04 -0500 Subject: [PATCH] user older functions as getres* are >=2.7 --- lib/ansible/module_utils/facts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index 1f5b790d402..6ede1fa21ce 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -553,8 +553,10 @@ class Facts(object): self.facts['user_gecos'] = pwent.pw_gecos self.facts['user_dir'] = pwent.pw_dir self.facts['user_shell'] = pwent.pw_shell - (self.facts['real_user_id'], self.facts['effective_user_id'], self.facts['saved_user_id']) = os.getresuid() - (self.facts['real_group_id'], self.facts['effective_group_id'], self.facts['saved_group_id']) = os.getresgid() + self.facts['real_user_id'] = os.getuid() + self.facts['effective_user_id'] = os.geteuid() + self.facts['real_group_id'] = os.getgid() + self.facts['effective_group_id'] = os.getgid() def get_env_facts(self): self.facts['env'] = {}