some Debian specific patches
The attached patch has some Debian specific patches to the policy.
I've put in a couple of ifdef(`distro_redhat' entries, in some of those cases we might want to make either the Debian or the Red Hat way the default for other distributions.
Signature · 10 lines
russell at coker.com.au http://etbe.coker.com.au/ My Main Blog http://doc.coker.com.au/ My Documents Blog -------------- next part -------------- A non-text attachment was scrubbed... Name: debian.diff Type: text/x-patch Size: 8847 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20100707/63de32ba/attachment.bin
Quoted 10 lines · Russell Coker
The attached patch has some Debian specific patches to the policy.
I've put in a couple of ifdef(`distro_redhat' entries, in some of those cases we might want to make either the Debian or the Red Hat way the default for other distributions.
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy
After applying the patch I get the following errors (using the latest release of userspace tools and refpolicy):
/etc/selinux/refpolicy-mcs/contexts/files/file_contexts: Multiple same specifications for /var/lib/dcc(/.*)?. /etc/selinux/refpolicy-mcs/contexts/files/file_contexts: Multiple same specifications for /var/lib/dcc/map. /etc/selinux/refpolicy-mcs/contexts/files/file_contexts: Invalid argument
libsemanage.semanage_install_active: setfiles returned error code 1. /usr/sbin/semodule: Failed!
In fact, after applying the patch the same two definitions are repeated twice (for the debian define) in policy/modules/services/dcc.fc. Thus the whole "ifdef(`distro_debian'..." should be probably removed from the modified version...
Regards,
Guido
Quoted 4 lines · Guido Trentalancia
In fact, after applying the patch the same two definitions are repeated twice (for the debian define) in policy/modules/services/dcc.fc. Thus the whole "ifdef(`distro_debian'..." should be probably removed from the modified version...
Good point. I've attached a new patch for dcc.fc. Do you agree with all the other Debian changes from my previous patch?
Signature · 10 lines
russell at coker.com.au http://etbe.coker.com.au/ My Main Blog http://doc.coker.com.au/ My Documents Blog -------------- next part -------------- A non-text attachment was scrubbed... Name: debian-dcc.diff Type: text/x-patch Size: 1455 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20100708/b8818077/attachment.bin
Quoted 9 lines · Russell Coker
Quoted 4 lines · Guido Trentalancia
In fact, after applying the patch the same two definitions are repeated twice (for the debian define) in policy/modules/services/dcc.fc. Thus the whole "ifdef(`distro_debian'..." should be probably removed from the modified version...
Good point. I've attached a new patch for dcc.fc. Do you agree with all the other Debian changes from my previous patch?
I am testing it out. Have not checked everything toughrouly...
In policy//modules/admin/apt.fc I have not removed the following:
"/var/log/aptitude gen_context(system_u:object_r:apt_var_log_t,s0)"
Guido
Quoted 1 line · Russell Coker
The attached patch has some Debian specific patches to the policy.
The following lines of dpkg.te are already upstream (indeed this patch deletes the last two and adds them back in a different place):apt_use_fds(dpkg_script_t)apt_rw_pipes(dpkg_script_t) init_use_script_fds(dpkg_script_t) init_use_script_ptys(dpkg_t)
The use of the userdomain attribute in dpkg.te breaks the encapsulation rules: the correct thing to do is use dpkg_read_db in one of the user domain templates (userdom_common_user_template seems right to me).
I don't think the labelling of gnome-vfs-daemon belongs in dbus.fc unless it is getting a dbus type. I don't know whether bin_t is the correct type or not.
I am not sure, but I think it is better style to use read_files_pattern for system_dbusd_t (the reason for that patch is probably not obvious: it is because dbus reads /proc/X/cmdline for processes that connect to it, so it can include their name in its log messages).
I attach an amended patch that fixes the above issues, except for gnome-vfs-daemon because I don't know what the correct type there is.
Quoted 3 lines
I've put in a couple of ifdef(`distro_redhat' entries, in some of those cases we might want to make either the Debian or the Red Hat way the default for other distributions.
It seems to me rather pointless to put in all these distro defines, especially in file contexts - whatever distro you are running, if you have a file at /usr/libexec/dcc/dbclean then you probably want it labelled as dcc_dbclean_exec_t. And fcs for files that don't exist are harmless beyond using a few bytes.
However I leave that up to Chris, I have not touched the distro defines in my amended patch (except as suggested by Guido).
Signature · 8 lines
Martin Orr -------------- next part -------------- A non-text attachment was scrubbed... Name: debian.diff Type: text/x-diff Size: 6773 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20100711/78c556e3/attachment.bin
Quoted 7 lines · Martin Orr
Quoted 5 lines · Russell Coker
I've put in a couple of ifdef(`distro_redhat' entries, in some of those cases
we might want to make either the Debian or the Red Hat way the default for
other distributions.
Quoted 7 lines
It seems to me rather pointless to put in all these distro defines, especially in file contexts - whatever distro you are running, if you have a file at
/usr/libexec/dcc/dbcleanthen you probably want it labelled asdcc_dbclean_exec_t. And fcs for files that don't exist are harmless beyond using a few bytes.However I leave that up to Chris,
I tend to agree.
Quoted 2 lines
I have not touched the distro defines
in my amended patch (except as suggested by Guido).
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC www.tresys.com | oss.tresys.com
Quoted 9 lines · Christopher J. PeBenito
Quoted 7 lines
It seems to me rather pointless to put in all these distro defines, especially in file contexts - whatever distro you are running, if you have a file at
/usr/libexec/dcc/dbcleanthen you probably want it labelled asdcc_dbclean_exec_t. And fcs for files that don't exist are harmless beyond using a few bytes.However I leave that up to Chris,
I tend to agree.
One benefit of distro defines in the file_contexts is that we know which distributions they apply to. So if we have three distributions with different directories used and two different versions of the daemon with different file names then we can retire the old names in a sensible manner.
If there are no defines then it's difficult to determine who uses what.
Now we could have comments, but they aren't quite as good because there is no requirement to keep them accurate.
Signature · 3 lines
russell at coker.com.au http://etbe.coker.com.au/ My Main Blog http://doc.coker.com.au/ My Documents Blog