All of lore.kernel.org
 help / color / mirror / Atom feed
From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH v2]: fix packagekit file context (standard location for the daemon)
Date: Tue, 26 Jun 2012 09:44:57 -0400	[thread overview]
Message-ID: <4FE9BCD9.7010307@tresys.com> (raw)
In-Reply-To: <1340240971.2940.2.camel@vortex>

On 06/20/12 21:09, Guido Trentalancia wrote:
> Hello again.
> 
> I also noticed that the working directories that it needs to access as a
> minimum condition also seems broken, according to the latest version
> available:

Merged.

> --- refpolicy-04062012/policy/modules/contrib/rpm.fc	2012-06-21 01:58:45.505739558 +0200
> +++ refpolicy-04062012-packagekit-fc-standard/policy/modules/contrib/rpm.fc	2012-06-21 02:06:21.475277343 +0200
> @@ -7,13 +7,13 @@
>  
>  /usr/bin/yum 			--	gen_context(system_u:object_r:rpm_exec_t,s0)
>  
> +/usr/libexec/packagekitd	--	gen_context(system_u:object_r:rpm_exec_t,s0)
>  /usr/libexec/yumDBUSBackend.py	--	gen_context(system_u:object_r:rpm_exec_t,s0)
>  
>  /usr/sbin/yum-complete-transaction --	gen_context(system_u:object_r:rpm_exec_t,s0)
>  
>  /usr/sbin/system-install-packages --	gen_context(system_u:object_r:rpm_exec_t,s0)
>  /usr/sbin/yum-updatesd		--	gen_context(system_u:object_r:rpm_exec_t,s0)
> -/usr/sbin/packagekitd		--	gen_context(system_u:object_r:rpm_exec_t,s0)
>  
>  /usr/share/yumex/yumex-yum-backend --	gen_context(system_u:object_r:rpm_exec_t,s0)
>  /usr/share/yumex/yum_childtask\.py --	gen_context(system_u:object_r:rpm_exec_t,s0)
> @@ -27,9 +27,11 @@ ifdef(`distro_redhat', `
>  /usr/sbin/up2date		--	gen_context(system_u:object_r:rpm_exec_t,s0)
>  ')
>  
> +/var/cache/PackageKit(/.*)?		gen_context(system_u:object_r:rpm_var_cache_t,s0)
>  /var/cache/yum(/.*)?			gen_context(system_u:object_r:rpm_var_cache_t,s0)
>  
>  /var/lib/alternatives(/.*)?		gen_context(system_u:object_r:rpm_var_lib_t,s0)
> +/var/lib/PackageKit(/.*)?		gen_context(system_u:object_r:rpm_var_lib_t,s0)
>  /var/lib/rpm(/.*)?			gen_context(system_u:object_r:rpm_var_lib_t,s0)
>  /var/lib/yum(/.*)?			gen_context(system_u:object_r:rpm_var_lib_t,s0)
>  
> Besides that, it might need permissions related to the network, but I
> suppose that can be managed on a per-site or per-distribution basis (or
> otherwise by using booleans).
> 
> On Wed, 2012-06-20 at 17:56 +0200, Guido Trentalancia wrote:
>> It seems that the current refpolicy file contexts are using a wrong (or
>> at least rather obsolete) location for the PackageKit daemon executable.
>>
>> It's standard location is in /usr/libexec and not /usr/sbin (FC17 also
>> apparently uses the latter).
>>
>> Finally, consider that PackageKit should now ship also with
>> distributions other than Redhat.
>>
>> So, either of these two patches, would probably be a good move:
>>
>> --- refpolicy-04062012/policy/modules/contrib/rpm.fc	2011-09-09 18:29:23.592611047 +0200
>> +++ refpolicy-04062012-packagekit-fc/policy/modules/contrib/rpm.fc	2012-06-19 19:12:07.420661407 +0200
>> @@ -13,7 +13,13 @@
>>  
>>  /usr/sbin/system-install-packages --	gen_context(system_u:object_r:rpm_exec_t,s0)
>>  /usr/sbin/yum-updatesd		--	gen_context(system_u:object_r:rpm_exec_t,s0)
>> +
>> +ifndef(`distro_redhat', `
>> +/usr/libexec/packagekitd	--	gen_context(system_u:object_r:rpm_exec_t,s0)
>> +')
>> +ifdef(`distro_redhat', `
>>  /usr/sbin/packagekitd		--	gen_context(system_u:object_r:rpm_exec_t,s0)
>> +')
>>  
>>  /usr/share/yumex/yumex-yum-backend --	gen_context(system_u:object_r:rpm_exec_t,s0)
>>  /usr/share/yumex/yum_childtask\.py --	gen_context(system_u:object_r:rpm_exec_t,s0)
>>
>> Or:
>>
>> --- refpolicy-04062012/policy/modules/contrib/rpm.fc	2012-06-20 17:47:29.249999920 +0200
>> +++ refpolicy-04062012-packagekit-fc-standard/policy/modules/contrib/rpm.fc	2012-06-20 17:46:05.436179710 +0200
>> @@ -13,7 +13,8 @@
>>  
>>  /usr/sbin/system-install-packages --	gen_context(system_u:object_r:rpm_exec_t,s0)
>>  /usr/sbin/yum-updatesd		--	gen_context(system_u:object_r:rpm_exec_t,s0)
>> -/usr/sbin/packagekitd		--	gen_context(system_u:object_r:rpm_exec_t,s0)
>> +
>> +/usr/libexec/packagekitd	--	gen_context(system_u:object_r:rpm_exec_t,s0)
>>  
>>  /usr/share/yumex/yumex-yum-backend --	gen_context(system_u:object_r:rpm_exec_t,s0)
>>  /usr/share/yumex/yum_childtask\.py --	gen_context(system_u:object_r:rpm_exec_t,s0)
> 
> 
> 
> _______________________________________________
> refpolicy mailing list
> refpolicy at oss.tresys.com
> http://oss.tresys.com/mailman/listinfo/refpolicy
> 


-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

  reply	other threads:[~2012-06-26 13:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20 15:56 [refpolicy] [PATCH]: fix packagekit file context (standard location for the daemon) Guido Trentalancia
2012-06-21  1:09 ` [refpolicy] [PATCH v2]: " Guido Trentalancia
2012-06-26 13:44   ` Christopher J. PeBenito [this message]
2012-06-26 13:50     ` Dominick Grift
2012-06-26 14:06       ` Christopher J. PeBenito
2012-06-26 19:39         ` Guido Trentalancia
2012-06-26 19:45           ` Dominick Grift
2012-06-27 16:59             ` Guido Trentalancia
2012-06-27 17:13               ` Dominick Grift
2012-06-27 18:28                 ` Guido Trentalancia
2012-06-27 17:32         ` Guido Trentalancia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FE9BCD9.7010307@tresys.com \
    --to=cpebenito@tresys.com \
    --cc=refpolicy@oss.tresys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.