Bug#587949: dpkg gives sym-links and other non-file object the wrong SE Linux labels

2010-08-12 Thread Guillem Jover
On Thu, 2010-07-29 at 22:02:00 +1000, Russell Coker wrote: > On Thu, 29 Jul 2010, Guillem Jover wrote: > > as they cannot be hardlinked it needs to create a new > > symlink with the same contents as the one. But as this one is > > a newly created object it needs the permissions and SE Linux labe

Bug#587949: dpkg gives sym-links and other non-file object the wrong SE Linux labels

2010-07-29 Thread Russell Coker
On Thu, 29 Jul 2010, Guillem Jover wrote: > as they cannot be hardlinked it needs to create a new > symlink with the same contents as the one. But as this one is > a newly created object it needs the permissions and SE Linux labels > applied to it, otherwise if we need to roll-back with rename(2

Bug#587949: dpkg gives sym-links and other non-file object the wrong SE Linux labels

2010-07-29 Thread Guillem Jover
On Thu, 2010-07-29 at 15:20:29 +1000, Russell Coker wrote: > On Thu, 29 Jul 2010, Guillem Jover wrote: > > > For files in /usr/sbin it seems that both code paths that call > > > set_selinux_path_context() are being executed, it would be good if we > > > could only call set_selinux_path_context() o

Bug#587949: dpkg gives sym-links and other non-file object the wrong SE Linux labels

2010-07-28 Thread Russell Coker
On Thu, 29 Jul 2010, Guillem Jover wrote: > > For files in /usr/sbin it seems that both code paths that call > > set_selinux_path_context() are being executed, it would be good if we > > could only call set_selinux_path_context() once as it's not the fastest > > function... > > The two calls shou

Bug#587949: dpkg gives sym-links and other non-file object the wrong SE Linux labels

2010-07-28 Thread Guillem Jover
Hi! On Sat, 2010-07-03 at 17:00:20 +1000, Russell Coker wrote: > Package: dpkg > Version: 1.15.7.2 > Severity: normal > > The mode parameter to the matchpathcon() is used for the format type (IE file, > dir, etc) NOT for the permission bits. So the mask in the > set_selinux_path_context() functi

Bug#587949: dpkg gives sym-links and other non-file object the wrong SE Linux labels

2010-07-03 Thread Russell Coker
Package: dpkg Version: 1.15.7.2 Severity: normal The mode parameter to the matchpathcon() is used for the format type (IE file, dir, etc) NOT for the permission bits. So the mask in the set_selinux_path_context() function discards all the bits that we want. While the man page matchpathcon(3) isn