Skip to contentSkip to conversation

policycoreutils - semanage does not set umask

DISCUSSION Manoj Srivastava 2 participants 2 messages Aug 23, 2009 – Sep 1, 2009 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hi,

This has been reported to the Debian BTS.

semanage does not set the umask for itself and does not fix the
permissions of rewritten files. This leads to a unreadable (for generic user and therfor ssh) seusers file:
-rw-r----- 1 root root 187 17. Apr 16:22 /etc/selinux/default/seusers

The pam module does not bail out on that but always assigns
user_u for users.

manoj

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524508

Signature · 7 lines
Manoj Srivastava <[email protected]> <http://www.golden-gryphon.com/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 9 lines · Manoj Srivastava

Hi,

This has been reported to the Debian BTS.

semanage does not set the umask for itself and does not fix the
permissions of rewritten files. This leads to a unreadable (for generic user and therfor ssh) seusers file:
-rw-r----- 1 root root 187 17. Apr 16:22 /etc/selinux/default/seusers

Quoted 6 lines

The pam module does not bail out on that but always assigns
user_u for users.

manoj

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524508

When installing files such as seusers, semanage should be installing with a default file mode of 0644 or the file-mode specified by /etc/selinux/semanage.conf.

Possibly the bug you are encountering is a consequence of the incorrect hard linking code introduced in libsemanage 2.0.31 that was reverted in libsemanage 2.0.35.

commit 8edc3f9730aab6bd8f52dafb9686baddaac83954

Author: Stephen Smalley <[email protected]>
Date:   Wed Aug 5 11:19:29 2009 -0400

libsemanage: do not hard link files

Remove the support for hard linking files in semanage_copy_file, as it is unsafe and can leave the active store corrupted if something goes wrong during the transaction. It also can leave the installed policy files with incorrect file modes or security contexts.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.