SELinux - canonicalize getxattr() (fwd)
Subsystems (3)
James Morris
maintainerPATCH 1/1 SELinux - canonicalize getxattr() (fwd)
This patch has been added to Andrew Morton's tree and is a candidate for the 2.6.15 kernel.
---------- Forwarded message ----------
Date: Tue, 13 Sep 2005 16:08:08 -0400 (EDT)
From: James Morris <[email protected]>
To: Andrew Morton <[email protected]>
Cc: [email protected], Stephen Smalley <[email protected]>,
Chris Wright <[email protected]>
Subject: [PATCH] SELinux - canonicalize getxattr()
This patch allows SELinux to canonicalize the value returned from getxattr() via the security_inode_getsecurity() hook, which is called after the fs level getxattr() function.
The purpose of this is to allow the in-core security context for an inode to override the on-disk value. This could happen in cases such as upgrading a system to a different labeling form (e.g. standard SELinux to MLS) without needing to do a full relabel of the filesystem.
In such cases, we want getxattr() to return the canonical security context that the kernel is using rather than what is stored on disk.
The implementation hooks into the inode_getsecurity(), adding another parameter to indicate the result of the preceding fs-level getxattr() call, so that SELinux knows whether to compare a value obtained from disk with the kernel value.
We also now allow getxattr() to work for mountpoint labeled filesystems (i.e. mount with option context=foo_t), as we are able to return the kernel value to the user.
Please apply.
---
fs/xattr.c | 14 +++++++++----- include/linux/security.h | 11 +++++++---- security/dummy.c | 2 +- security/selinux/hooks.c | 46 ++++++++++++++++++++++++++++++++-------------- 4 files changed, 49 insertions(+), 24 deletions(-)
fs/xattr.c +9 -5
@@ -143,7 +143,7 @@ getxattr(struct dentry *d, char __user *if (size) {if (size >XATTR_SIZE_MAX ) size =XATTR_SIZE_MAX ; - kvalue =kmalloc (size,GFP_KERNEL ); + kvalue =kzalloc (size,GFP_KERNEL );if (!kvalue)return -ENOMEM ; }
@@ -154,11 +154,15 @@ getxattr(struct dentry *d, char __user * error = -EOPNOTSUPP ;if (d->d_inode->i_op && d->d_inode->i_op->getxattr) error = d->d_inode->i_op->getxattr (d, kname, kvalue, size); -else if (!strncmp (kname,XATTR_SECURITY_PREFIX , -sizeof XATTR_SECURITY_PREFIX -1 )) { + +if (!strncmp (kname,XATTR_SECURITY_PREFIX , +sizeof XATTR_SECURITY_PREFIX -1 )) {const char *suffix = kname +sizeof XATTR_SECURITY_PREFIX -1 ; - error =security_inode_getsecurity (d->d_inode, suffix, kvalue, - size); +int rv =security_inode_getsecurity (d->d_inode, suffix, kvalue, + size, error); +/* Security module active: overwrite error value */ +if (rv != -EOPNOTSUPP ) + error = rv; }if (error >0 ) {if (size &©_to_user (value, kvalue, error))
include/linux/security.h +7 -4
@@ -385,6 +385,9 @@ struct swap_info_struct;* NULL to request the size of the buffer required. @size indicates * the size of @buffer in bytes. Note that @name is the remainder * of the attribute name after the security. prefix has been removed. +* @err is the return value from the preceding fs getxattr call, +* and can be used by the security module to determine whether it +* should try and canonicalize the attribute value. * Return number of bytes used/required on success. * @inode_setsecurity: * Set the security label associated with @name for @inode from the
@@ -1091,7 +1094,7 @@ struct security_operations {int (*inode_getxattr) (struct dentry *dentry,char *name);int (*inode_listxattr) (struct dentry *dentry);int (*inode_removexattr) (struct dentry *dentry,char *name); -int (*inode_getsecurity)(struct inode *inode,const char *name,void *buffer,size_t size); +int (*inode_getsecurity)(struct inode *inode,const char *name,void *buffer,size_t size,int err);int (*inode_setsecurity)(struct inode *inode,const char *name,const void *value,size_t size,int flags);int (*inode_listsecurity)(struct inode *inode,char *buffer,size_t buffer_size);
@@ -1580,11 +1583,11 @@ static inline int security_inode_removexreturn security_ops->inode_removexattr (dentry, name); } -static inline int security_inode_getsecurity (struct inode *inode,const char *name,void *buffer,size_t size) +static inline int security_inode_getsecurity (struct inode *inode,const char *name,void *buffer,size_t size,int err) {if (unlikely (IS_PRIVATE (inode)))return 0 ; -return security_ops->inode_getsecurity (inode, name, buffer, size); +return security_ops->inode_getsecurity (inode, name, buffer, size, err); }static inline int security_inode_setsecurity (struct inode *inode,const char *name,const void *value,size_t size,int flags)
@@ -2222,7 +2225,7 @@ static inline int security_inode_removexreturn cap_inode_removexattr (dentry, name); } -static inline int security_inode_getsecurity (struct inode *inode,const char *name,void *buffer,size_t size) +static inline int security_inode_getsecurity (struct inode *inode,const char *name,void *buffer,size_t size,int err) {return -EOPNOTSUPP ; }
security/dummy.c +1 -1
@@ -377,7 +377,7 @@ static int dummy_inode_removexattr (strureturn 0 ; } -static int dummy_inode_getsecurity (struct inode *inode,const char *name,void *buffer,size_t size) +static int dummy_inode_getsecurity (struct inode *inode,const char *name,void *buffer,size_t size,int err) {return -EOPNOTSUPP ; }
security/selinux/hooks.c +32 -14
74 lines not on this page · raw message
--
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.
Quoted 11 lines · James Morris
This patch allows SELinux to canonicalize the value returned from
getxattr()via thesecurity_inode_getsecurity()hook, which is called after the fs levelgetxattr()function.The purpose of this is to allow the in-core security context for an inode to override the on-disk value. This could happen in cases such as upgrading a system to a different labeling form (e.g. standard SELinux to MLS) without needing to do a full relabel of the filesystem.
In such cases, we want
getxattr()to return the canonical security context that the kernel is using rather than what is stored on disk.
Hi,
An issue has arisen with regard to the canonicalization of getxattr results and the use of type aliases in targeted policy; some private discussion has occurred, but I'm taking discussion to the list as a follow-up to the message where the canonicalization patch was posted to the list.
The bugzilla report is at
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=171846
Targeted policy presently defines a number of type aliases to provide compatibility and allow sharing with strict policy, both in the policy itself (macros, .te and .fc files) and in the on-disk xattrs. Since setxattr does not canonicalize the attributes, the alias is stored on disk, so for example, .so files are labeled as shlib_t even though targeted policy aliases this to lib_t. This is advantageous for policy sharing and for conversion between policies. It also seems important for allowing shared policy modules; by using the more specific names in the module, the module should be able to be used on either targeted or strict.
Prior to the patch to canonicalize getxattr results, getxattr would return the on-disk xattr value, so it would also show the alias name. With the canonicalization patch, it instead shows the primary name. This creates confusion for programs like setfiles and restorecon that compare the context obtained via matchpathcon with the context obtained via getfilecon to determine whether the file needs to be relabeled, yielding repeated messages about mislabeled files despite the files actually being labeled correctly. restorecon -Rv /lib on a rawhide targeted system illustrates the point.
The canonicalization of getxattr results is desirable, but we do need to address the problem above. I've created experimental patches for libsepol and libselinux to allow matchpathcon_init to canonicalize contexts from file contexts against a policy (attached), although I think it would be better to do this via a selinuxfs interface rather than via sepol, as the latter requires reading of a binary policy.
However, regardless of how it is implemented, this change to matchpathcon_init has another side effect: rpm will then label files with the primary names rather than the alias names, so subsequent conversion of the system to a different policy where they were distinct types will be more difficult (essentially requires permissive mode boot and relabel, as .so files may not be executable under the new policy). Not sure whether that is a real concern.
This change also doesn't address the issue in general, only for users of matchpathcon. If we implement it via selinuxfs, it would be feasible to apply the canonicalization on all context translations, although even that might be expensive. With the current policy-based canonicalization, it is definitely too expensive to apply on all context translations unless we cache the policy in memory in some manner (e.g. translation daemon). But even that won't address the potential confusion noted by Dan of a user performing a chcon -t shlib_t foo and then seeing lib_t on the file upon a ls -Z. I'm not sure whether that is a major issue in practice.
Thoughts?
Signature · 2 lines
Stephen Smalley National Security Agency
Index: libsepol/include/sepol/policydb.h
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/libsepol/include/sepol/policydb.h,v retrieving revision 1.20
include/sepol/policydb.h +10 -0
@@ -124,6 +124,16 @@ extern int sepol_policydb_to_image(sepolvoid **newdata, size_t *newlen); +/* +* Canonicalize a security context for a given policy. +* Sets '*newcon' to the canonicalized context. +* Caller must free *newcon via free(). +*/ +extern int sepol_policydb_canonicalize_context (sepol_handle_t *handle, +sepol_policydb_t *p, +const char *oldcon, +char **newcon); +#endif
Index: libsepol/src/libsepol.map
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/libsepol/src/libsepol.map,v retrieving revision 1.11
src/libsepol.map +1 -0
@@ -9,6 +9,7 @@ sepol_policydb_set_typesvers; sepol_policydb_set_vers; sepol_policydb_read; sepol_policydb_write; sepol_policydb_from_image; sepol_policydb_to_image; + sepol_policydb_canonicalize_context; sepol_module_package_create; sepol_module_package_free; sepol_module_package_get_file_contexts; sepol_module_package_get_file_contexts_len;
Index: libsepol/src/policydb_public.c
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/libsepol/src/policydb_public.c,v retrieving revision 1.3
src/policydb_public.c +21 -0
@@ -3,6 +3,7 @@#include "debug.h" #include <sepol/policydb/policydb.h> +#include "context.h" /* Policy file interfaces. */
@@ -157,3 +158,23 @@ int sepol_policydb_to_image(sepol_handlereturn policydb_to_image (handle, &p->p, newdata, newlen); } +int sepol_policydb_canonicalize_context (sepol_handle_t *handle, +sepol_policydb_t *p, +const char *oldcon, +char **newcon) +{ +context_struct_t *con; +size_t len; +int rc =STATUS_ERR ; + +if (context_from_string (handle, &p->p, &con, + oldcon,strlen (oldcon)+1 ) <0 ) +return rc; +if (context_to_string (handle, &p->p, con, newcon, &len) <0 ) + goto out; + rc =STATUS_SUCCESS ; +out: +context_destroy (con); +free (con); +return rc; +}
Index: libselinux/src/load_policy.c
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/libselinux/src/load_policy.c,v retrieving revision 1.12
src/load_policy.c +62 -11
90 lines not on this page · raw message
Index: libselinux/src/matchpathcon.c
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/libselinux/src/matchpathcon.c,v retrieving revision 1.31
src/matchpathcon.c +51 -3
96 lines not on this page · raw message
Index: libselinux/src/selinux_internal.h
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/libselinux/src/selinux_internal.h,v retrieving revision 1.15
src/selinux_internal.h +6 -3
@@ -1,4 +1,5 @@#include <selinux/selinux.h> +#include <sepol/policydb.h> #include "dso.h" hidden_proto (selinux_mkload_policy)
@@ -59,9 +60,9 @@ hidden_proto(selinux_path)hidden_proto (selinux_check_passwd_access) hidden_proto(matchpathcon_init) hidden_proto(selinux_users_path) -hidden_proto(selinux_usersconf_path); -hidden_proto(selinux_translations_path); -hidden_proto(selinux_getenforcemode); +hidden_proto(selinux_usersconf_path) +hidden_proto(selinux_translations_path) +hidden_proto(selinux_getenforcemode) extern int context_translations hidden; extern int hidden trans_to_raw_context(char *trans, char **rawp);
@@ -69,3 +70,5 @@ extern int hidden raw_to_trans_context(c extern int load_setlocaldefs hidden; extern int require_seusers hidden; + +extern int hidden selinux_open_policydb(sepol_policydb_t **policydb);
James Morris
maintainerQuoted 1 line · Stephen Smalley
Thoughts?
It may be helpful to have type aliases, but are they truly necessary?
Seems like a lot of potential problems arise from them, including confusing SELinux developers.
Perhaps type aliasing would be better implemented as a higher level policy construct?
- James
Signature · 7 lines
James Morris <[email protected]> -- 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.
Quoted 11 lines · James Morris
Quoted 1 line · Stephen Smalley
Thoughts?
It may be helpful to have type aliases, but are they truly necessary?
Seems like a lot of potential problems arise from them, including confusing SELinux developers.
Perhaps type aliasing would be better implemented as a higher level policy construct?
There seem to be three uses of the aliases:
1) compatibility across policy changes, e.g. when a type is removed or renamed, an alias can be defined so that any existing processes or objects with the type aren't rendered unlabeled upon the policy reload,
2) on-disk compatibility between policies, so that a filesystem initially labeled for targeted policy is still fairly useable for bootstrapping a strict policy system even though the latter has finer-grained types,
3) sharing among policies, both at a source level (macros, .te files, .fc files) and for binary policy modules, so that policy modules (source or binary) can refer to types that may then be coalesced or kept separate as appropriate for a given base policy.
#3 could be done entirely via a higher level construct, but we don't have such a higher level construct yet and are relying on the ability to share among policies in this manner. #2 may not be critical. #1 seems to require that the kernel retain a notion of the aliases.
If #2 is not critical, then changing matchpathcon_init in the proposed manner may be sufficient (whether using sepol or selinuxfs as the backend). With that change, upgraded systems that have existing uses of alias names in on-disk xattrs won't cause spurious complaints by setfiles/restorecon, and a clean install should yield a system with no alias names stored in the on-disk xattrs since rpm will get canonical names. We could instrument the setfilecon functions in libselinux to also canonicalize the context prior to calling setxattr. On second thought, it seems overkill to do it on context translations, as this is only an issue for file contexts and is already covered for getxattr, so we are primarily concerned with matchpathcon and setfilecon.
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.
Quoted 30 lines · Stephen Smalley
Quoted 10 lines · James Morris
Quoted 1 line · Stephen Smalley
Thoughts?
It may be helpful to have type aliases, but are they truly necessary?
Seems like a lot of potential problems arise from them, including confusing SELinux developers.
Perhaps type aliasing would be better implemented as a higher level policy construct?
There seem to be three uses of the aliases:
1) compatibility across policy changes, e.g. when a type is removed or renamed, an alias can be defined so that any existing processes or objects with the type aren't rendered unlabeled upon the policy reload,
2) on-disk compatibility between policies, so that a filesystem initially labeled for targeted policy is still fairly useable for bootstrapping a strict policy system even though the latter has finer-grained types,
3) sharing among policies, both at a source level (macros, .te files, .fc files) and for binary policy modules, so that policy modules (source or binary) can refer to types that may then be coalesced or kept separate as appropriate for a given base policy.#3 could be done entirely via a higher level construct, but we don't have such a higher level construct yet and are relying on the ability to share among policies in this manner. #2 may not be critical. #1 seems to require that the kernel retain a notion of the aliases.
Quoted 11 lines
If #2 is not critical, then changing
matchpathcon_initin the proposed manner may be sufficient (whether using sepol or selinuxfs as the backend). With that change, upgraded systems that have existing uses of alias names in on-disk xattrs won't cause spurious complaints by setfiles/restorecon, and a clean install should yield a system with no alias names stored in the on-disk xattrs since rpm will get canonical names. We could instrument the setfilecon functions in libselinux to also canonicalize the context prior to calling setxattr. On second thought, it seems overkill to do it on context translations, as this is only an issue for file contexts and is already covered for getxattr, so we are primarily concerned with matchpathcon and setfilecon.
Did this ever get resolved? I see that this patch has made it into the rawhide kernel. This means that when installing a new policy rpm, my screen is flooded with fixfiles relabeling lib_t to shlib_t, due to shlib_t being a typealias of lib_t in targeted. Are we worried about this right now, or are these messages ok?
Signature · 10 lines
---------------------- Chad Sellers Tresys Technology, LLC [email protected] http://www.tresys.com -- 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.
Quoted 47 lines · Chad Sellers
Quoted 32 lines · Stephen Smalley
Quoted 4 lines · James Morris
Quoted 2 lines · Stephen Smalley
Thoughts?
Quoted 8 lines
It may be helpful to have type aliases, but are they truly necessary?
Seems like a lot of potential problems arise from them, including confusing SELinux developers.
Perhaps type aliasing would be better implemented as a higher level policy construct?
There seem to be three uses of the aliases:
1) compatibility across policy changes, e.g. when a type is removed or renamed, an alias can be defined so that any existing processes or objects with the type aren't rendered unlabeled upon the policy reload,
2) on-disk compatibility between policies, so that a filesystem initially labeled for targeted policy is still fairly useable for bootstrapping a strict policy system even though the latter has finer-grained types,
3) sharing among policies, both at a source level (macros, .te files, .fc files) and for binary policy modules, so that policy modules (source or binary) can refer to types that may then be coalesced or kept separate as appropriate for a given base policy.#3 could be done entirely via a higher level construct, but we don't have such a higher level construct yet and are relying on the ability to share among policies in this manner. #2 may not be critical. #1 seems to require that the kernel retain a notion of the aliases.
Quoted 12 lines
If #2 is not critical, then changing
matchpathcon_initin the proposed manner may be sufficient (whether using sepol or selinuxfs as the backend). With that change, upgraded systems that have existing uses of alias names in on-disk xattrs won't cause spurious complaints by setfiles/restorecon, and a clean install should yield a system with no alias names stored in the on-disk xattrs since rpm will get canonical names. We could instrument the setfilecon functions in libselinux to also canonicalize the context prior to calling setxattr. On second thought, it seems overkill to do it on context translations, as this is only an issue for file contexts and is already covered for getxattr, so we are primarily concerned with matchpathcon and setfilecon.
Quoted 3 lines
Did this ever get resolved? I see that this patch has made it into the rawhide kernel. This means that when installing a new policy rpm, my screen is flooded with fixfiles relabeling
lib_ttoshlib_t, due toshlib_tbeing a typealias oflib_tin targeted. Are we worried about this right now, or are these messages ok?
We are supposed to be patching restorecon/chcon/setfiles to make these go away or at most warn. These tools should be asking the kernel for the correct context for a file IE shlib_t -> lib_t in targeted policy and then says it is ok.
Signature · 4 lines
-- 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.
Quoted 4 lines · Daniel J Walsh
We are supposed to be patching restorecon/chcon/setfiles to make these go away or at most warn. These tools should be asking the kernel for the correct context for a file IE
shlib_t->lib_tin targeted policy and then says it is ok.
I already took care of restorecon (via the modified matchpathcon logic) and setfiles (which has its own callback). But they need a kernel that has the new support for canonicalizing the contexts, and that only just showed up in 2.6.14-git13. Not in rawhide yet AFAIK.
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.
Quoted 10 lines · Stephen Smalley
Quoted 4 lines · Daniel J Walsh
We are supposed to be patching restorecon/chcon/setfiles to make these go away or at most warn. These tools should be asking the kernel for the correct context for a file IE
shlib_t->lib_tin targeted policy and then says it is ok.I already took care of restorecon (via the modified matchpathcon logic) and setfiles (which has its own callback). But they need a kernel that has the new support for canonicalizing the contexts, and that only just showed up in 2.6.14-git13. Not in rawhide yet AFAIK.
BTW, in addition to altering matchpatchcon for this purpose, I added security_canonicalize_context interfaces to libselinux to allow other applications to also obtain canonical contexts. So chcon could call that interface to get the canonical context and compare the result with the user-supplied context. The implementation provides a fallback for kernels that do not yet support the new functionality, simply returning the provided context in that case, so that nothing breaks (you just don't get the benefit of the canonicalization until the kernel includes the patch).
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.
Quoted 5 lines · Chad Sellers
Did this ever get resolved? I see that this patch has made it into the rawhide kernel. This means that when installing a new policy rpm, my screen is flooded with fixfiles relabeling
lib_ttoshlib_t, due toshlib_tbeing a typealias oflib_tin targeted. Are we worried about this right now, or are these messages ok?
A kernel patch was upstreamed to allow userspace to get the canonical context, and matchpathcon_init and setfiles were changed to use that support when present in the kernel in order to canonicalize the context, so that in the targeted policy case, both contexts will resolve to lib_t and they will compare as equal. The messages from fixfiles are what you would see _before_ the kernel patch is included.
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.
Quoted 5 lines · Chad Sellers
Did this ever get resolved? I see that this patch has made it into the rawhide kernel. This means that when installing a new policy rpm, my screen is flooded with fixfiles relabeling
lib_ttoshlib_t, due toshlib_tbeing a typealias oflib_tin targeted. Are we worried about this right now, or are these messages ok?
So the short answer is to not worry about these messages, as they do not reflect actual changes in labels (and are an issue already with existing targeted policy updates, not just refpolicy), and they will cease when the rawhide kernel picks up the latest -git snapshot.
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.
Quoted 11 lines · Stephen Smalley
Quoted 5 lines · Chad Sellers
Did this ever get resolved? I see that this patch has made it into the rawhide kernel. This means that when installing a new policy rpm, my screen is flooded with fixfiles relabeling
lib_ttoshlib_t, due toshlib_tbeing a typealias oflib_tin targeted. Are we worried about this right now, or are these messages ok?So the short answer is to not worry about these messages, as they do not reflect actual changes in labels (and are an issue already with existing targeted policy updates, not just refpolicy), and they will cease when the rawhide kernel picks up the latest -git snapshot.
OK. Anyone have an idea when this will hit rawhide? Before test1?
Signature · 11 lines
---------------------- Chad Sellers Tresys Technology, LLC [email protected] (410)290-1411 x117 http://www.tresys.com -- 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.
Quoted 8 lines · Chad Sellers
Quoted 7 lines · Stephen Smalley
Quoted 5 lines · Chad Sellers
Did this ever get resolved? I see that this patch has made it into the rawhide kernel. This means that when installing a new policy rpm, my screen is flooded with fixfiles relabeling
lib_ttoshlib_t, due toshlib_tbeing a typealias oflib_tin targeted. Are we worried about this right now, or are these messages ok?
Quoted 6 lines
Quoted 4 lines
So the short answer is to not worry about these messages, as they do not reflect actual changes in labels (and are an issue already with existing targeted policy updates, not just refpolicy), and they will cease when the rawhide kernel picks up the latest -git snapshot.
OK. Anyone have an idea when this will hit rawhide? Before test1?
I don't know; the kernel patch just showed up in -git13, so it should be included in the next rawhide kernel update, but I don't know when that will happen.
In any event, you should able to redirect output from the rpm update to a log file and just filter out lib_t/shlib_t noise to see any other changes of interest.
I'm doing the following:
- updating to the latest rawhide targeted policy first (or rolling back to it from prior attempted install of the refpolicy),
- running fixfiles restorecon to ensure that files are labeled consistently with that policy (should already be handled upon the update, but just wanted to be sure),
- running rpm -Uvh on the new policy rpm, redirecting stdout and stderr to a log file.
The restorecon is still running, but so far I have the following output excluding the lib_t->shlib_t noise:
$ grep -v 'lib_t.*shlib_t' log
Signature · 2 lines
Stephen Smalley National Security Agency
Quoted 3 lines · Stephen Smalley
I'm doing the following:
- updating to the latest rawhide targeted policy first (or rolling back to it from prior attempted install of the refpolicy),
And also updating to latest rawhide libse* and policycoreutils packages.
Quoted 9 lines
- running fixfiles restorecon to ensure that files are labeled consistently with that policy (should already be handled upon the update, but just wanted to be sure),
- running rpm -Uvh on the new policy rpm, redirecting stdout and stderr to a log file.The restorecon is still running, but so far I have the following output excluding the
lib_t->shlib_tnoise:$ grep -v 'lib_t.*shlib_t' log
Ok, rpm finished running, and there was no further output from restorecon. But there is also no installed policy on the system (outside of the sandbox). Hmmm...did rpm remove the installed files because they are no longer owned by the policy package itself, whereas they used to be?
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.