Bug 1096891

Summary: radiusd cannot write to tmp
Product: Red Hat Enterprise Linux 5 Reporter: Patrik Kis <pkis>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.11CC: dspurek, dwalsh, mmalik, pkis
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-2.4.6-351.el5 Doc Type: Bug Fix
Doc Text:
Due to missing rules in the SELinux policy, the radiusd daemon was unable to write to the /tmp/ directory. Consequently, when radiusd was integrated with the Kerberos network authentication system, an attempt to authenticate a user failed. This update applies a new SELinux policy module so that radiusd works correctly in the described scenario.
Story Points: ---
Clone Of: 1017107 Environment:
Last Closed: 2014-09-16 00:30:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1017107    
Bug Blocks:    

Comment 1 RHEL Program Management 2014-05-12 15:49:05 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 2 Miroslav Grepl 2014-05-13 07:46:02 UTC
Could you re-test it with

$ cat mypol.te
policy_module(mypol,1.0)

require{
 type radiusd_t;
}

type radiusd_tmp_t;
files_tmp_file(radiusd_tmp_t)

allow radiusd_t radiusd_tmp_t:dir create_dir_perms;
allow radiusd_t radiusd_tmp_t:file create_file_perms;
files_tmp_filetrans(radiusd_t, radiuesd_tmp_t, { file dir })

optional_policy(`
    kerberos_keytab_template(radiusd, radiusd_t)
    kerberos_manage_host_rcache(radiusd_t)
')


# make -f /usr/share/selinux/devel/Makefile mypol.pp
# semodule -i mypol.pp

Comment 3 Patrik Kis 2014-05-13 09:04:00 UTC
# cat mypol.te 
policy_module(mypol,1.0)

require{
 type radiusd_t;
}

type radiusd_tmp_t;
files_tmp_file(radiusd_tmp_t)

allow radiusd_t radiusd_tmp_t:dir create_dir_perms;
allow radiusd_t radiusd_tmp_t:file create_file_perms;
files_tmp_filetrans(radiusd_t, radiuesd_tmp_t, { file dir })

optional_policy(`
    kerberos_keytab_template(radiusd, radiusd_t)
    kerberos_manage_host_rcache(radiusd_t)
')
# make -f /usr/share/selinux/devel/Makefile mypol.pp
Compiling targeted mypol module
/usr/bin/checkmodule:  loading policy configuration from tmp/mypol.tmp
mypol.te:12:ERROR 'unknown type radiuesd_tmp_t' at token ';' on line 97976:
#line 12
	type_transition radiusd_t tmp_t:{ file dir } radiuesd_tmp_t;
/usr/bin/checkmodule:  error(s) encountered while parsing configuration
make: *** [tmp/mypol.mod] Error 1

Comment 4 Miroslav Grepl 2014-05-13 09:13:44 UTC
There is a typo.

-files_tmp_filetrans(radiusd_t, radiuesd_tmp_t, { file dir })
+files_tmp_filetrans(radiusd_t, radiusd_tmp_t, { file dir })

Comment 5 Patrik Kis 2014-05-13 10:01:28 UTC
The test is working with the custom policy and no new AVC denials appeared.

Comment 10 errata-xmlrpc 2014-09-16 00:30:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1205.html