home directory user context question
I seem to be doing something wrong with the latest refpolicy from git with configuring the user/login
I have in policy/usersgen_user(name,system_u, sysadm_r staff_r user_r, s0, s0 - mls_systemhigh, mcs_allcats)
then after reboot I:/usr/sbin/semanage login -a -s name:name
heres /usr/sbin/semanage user -l
Labeling MLS/ MLS/ SELinux User Prefix MCS Level MCS Range
SELinux Roles
name system_u s0 s0-s0:c0.c255staff_r user_r sysadm_r
root sysadm s0 s0-s0:c0.c255staff_r sysadm_rstaff_u staff s0 s0-s0:c0.c255staff_r sysadm_r
sysadm_u sysadm s0 s0-s0:c0.c255 sysadm_r system_u user s0 s0-s0:c0.c255 system_r unconfined_u unconfined s0 s0-s0:c0.c255
unconfined_ruser_u user s0 s0 user_r
then /usr/sbin/semanage login -l
Login Name SELinux User MLS/MCS Range
__default__ user_u s0
name name s0
root root s0-s0:c0.c255 system_u system_u s0-s0:c0.c255
for some reason my home directory is stuck with this context:
name:name user:object_r:user_home_t:s0 109 Feb 24 13:52 somefile
^
if I have the system in enforcing mode I can not access any of the files that have the start of the context "user:"
but if I chcon name:object_r:user_home_t:s0
^
I can access my info or change directories
am I missing something with my setup for user/login with semanage that gets the contexts to have "user" at the beginning?
Signature · 1 line
Justin P. Mattock
A message that is not in the archive (sent off-list or not yet received): 5A5E55DF96F73844AF7DFB0F48721F0F52E446D3E8@EUSAACMS0703.eamcs.ericsson.se
Quoted 4 lines · Alan Rouse
Your home directory is labeled "user:" or "
user_u" ?Mine is labeled "
user_u:"
yeah my mistake it's user_u
(user_u:object_r:user_home_dir_t)
dos this look correct?
or should it be:
name:object_r:user_home_dir_t
Justin P. Mattock
Quoted 11 lines · Justin P. mattock
Quoted 3 lines · Alan Rouse
Your home directory is labeled "user:" or "
user_u" ?Mine is labeled "
user_u:"yeah my mistake it's
user_u
(user_u:object_r:user_home_dir_t)
dos this look correct?or should it be:
name:object_r:user_home_dir_t
If you have UBAC enabled, then the seuser of the processes needs to match the seuser on the contents of your home directory. So your home dir should be name:object_r:user_home_dir_t.
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150
Quoted 10 lines · Christopher J. PeBenito
Quoted 9 lines · Justin P. mattock
Quoted 3 lines · Alan Rouse
Your home directory is labeled "user:" or "
user_u" ?Mine is labeled "
user_u:"yeah my mistake it's
user_u
(user_u:object_r:user_home_dir_t)
dos this look correct?
Quoted 7 lines
Quoted 2 lines
or should it be:
name:object_r:user_home_dir_tIf you have UBAC enabled, then the seuser of the processes needs to match the seuser on the contents of your home directory. So your home dir should be name:object_r:user_home_dir_t.
yeah that's what I figured.. I'm just hitting some odd quirk or something to where user_u just stays there, and "name" doesn't appear until I delete a file in my home directory i.g. mozilla(for example) after deleting and restarting things go to "name"
Justin P. Mattock