client/tools/osad/osa-dispatcher-selinux/osa-dispatcher.te.fedora17 | 1 +
client/tools/osad/osad.spec | 3 +++
2 files changed, 4 insertions(+)
New commits:
commit d43587899dc2da721e7d1cdea9f11203731dd520
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Aug 28 14:54:28 2012 +0200
Allow osa-dispatcher to read /etc/passwd, it seems to be needed by the generic python modules.
Addressing
File "/usr/lib64/python2.7/site.py", line 567, in <module>
main()
File "/usr/lib64/python2.7/site.py", line 549, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib64/python2.7/site.py", line 278, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib64/python2.7/site.py", line 253, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib64/python2.7/site.py", line 243, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib64/python2.7/sysconfig.py", line 521, in get_config_var
return get_config_vars().get(name)
File "/usr/lib64/python2.7/sysconfig.py", line 425, in get_config_vars
_CONFIG_VARS['userbase'] = _getuserbase()
File "/usr/lib64/python2.7/sysconfig.py", line 183, in _getuserbase
return env_base if env_base else joinuser("~", ".local")
File "/usr/lib64/python2.7/sysconfig.py", line 169, in joinuser
return os.path.expanduser(os.path.join(*args))
File "/usr/lib64/python2.7/posixpath.py", line 260, in expanduser
userhome = pwd.getpwuid(os.getuid()).pw_dir
KeyError: 'getpwuid(): uid not found: 0'
and
avc: denied { read } for pid=20899 comm="osa-dispatcher" name="passwd" dev="dm-1" ino=1836807 scontext=system_u:system_r:osa_dispatcher_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file
diff --git a/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher.te.fedora17 b/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher.te.fedora17
new file mode 100644
index 0000000..445c11e
--- /dev/null
+++ b/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher.te.fedora17
@@ -0,0 +1 @@
+auth_read_passwd(osa_dispatcher_t)
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 1a4bdef..aa2ffba 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -126,6 +126,9 @@ make -f Makefile.osad all
%if 0%{?include_selinux_package}
%{__perl} -i -pe 'BEGIN { $VER = join ".", grep /^\d+$/, split /\./, "%{version}.%{release}"; } s!\@\@VERSION\@\@!$VER!g;' osa-dispatcher-selinux/%{modulename}.te
+%if 0%{?fedora} >= 17
+cat osa-dispatcher-selinux/%{modulename}.te.fedora17 >> osa-dispatcher-selinux/%{modulename}.te
+%endif
for selinuxvariant in %{selinux_variants}
do
make -C osa-dispatcher-selinux NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile