Received: from zombie2.ncsc.mil (zombie2.ncsc.mil [144.51.88.133]) by tarius.tycho.ncsc.mil (8.13.1/8.13.1) with ESMTP id m7TDm3pd023904 for ; Fri, 29 Aug 2008 09:48:03 -0400 Received: from yx-out-1718.google.com (jazzdrum.ncsc.mil [144.51.5.7]) by zombie2.ncsc.mil (8.12.10/8.12.10) with ESMTP id m7TDlV5o011263 for ; Fri, 29 Aug 2008 13:47:31 GMT Received: by yx-out-1718.google.com with SMTP id 3so484083yxi.84 for ; Fri, 29 Aug 2008 06:48:03 -0700 (PDT) Message-ID: Date: Fri, 29 Aug 2008 19:18:02 +0530 From: "shaunak saha" To: "Stephen Smalley" Subject: Re: semodule -i error Cc: selinux@tycho.nsa.gov In-Reply-To: <1220016138.5708.289.camel@moss-spartans.epoch.ncsc.mil> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8841_23874916.1220017682474" References: <1220016138.5708.289.camel@moss-spartans.epoch.ncsc.mil> Sender: owner-selinux@tycho.nsa.gov List-Id: selinux@tycho.nsa.gov ------=_Part_8841_23874916.1220017682474 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline >So that's the problem - you didn't install it? Or you didn't include it >in your base? No.I didn't installed it,neither did anything to include it in base.Actually i m not aware what this module is required for.Previouly while inserting any module didn't got this erorr. >I think we'd have to see your module .te file This is my .te file policy_module(dbus_exe,1.0.0) ######################################## # # Declarations # require{ type system_dbusd_t; class dbus acquire_svc; class dbus send_msg; class gconf set_value; } type dbus_exe_t; type dbus_exe_exec_t; domain_type(dbus_exe_t) init_daemon_domain(dbus_exe_t, dbus_exe_exec_t) domtrans_pattern(unconfined_t,dbus_exe_exec_t,dbus_exe_t) role unconfined_r types dbus_exe_t; ######################################## # # dbus_exe local policy # # Check in /etc/selinux/refpolicy/include for macros to use instead of allow rules. # Some common macros (you might be able to remove some) files_read_etc_files(dbus_exe_t) libs_use_ld_so(dbus_exe_t) libs_use_shared_libs(dbus_exe_t) miscfiles_read_localization(dbus_exe_t) dbus_system_bus_client_template(dbus_exe,dbus_exe_t) ## internal communication is often done using fifo and unix sockets. allow dbus_exe_t self:fifo_file { read write }; allow dbus_exe_t self:unix_stream_socket create_stream_socket_perms; allow dbus_exe_t system_dbusd_t:dbus { send_msg }; allow dbus_exe_t self:dbus {acquire_svc send_msg}; allow dbus_exe_t self:chr_file {getattr read write}; allow dbus_exe_t devpts_t:chr_file {getattr read write}; allow dbus_exe_t self:process {signal}; On Fri, Aug 29, 2008 at 6:52 PM, Stephen Smalley wrote: > > On Fri, 2008-08-29 at 16:03 +0530, shaunak saha wrote: > > Hi all, > > > > When i m trying to install a module using semodule -i > module> i m geting the following error: > > > > libsepol.print_missing_requirements: dbus_rpc_example_server's global > > requirements were not met: type/attribute resmgrd_var_run_t > > So your module has a require on that type (presumably by using an > interface that depends on it), and you don't have that type defined in > your policy. > > > libsemanage.semanage_link_sandbox: Link packages failed > > semodule: Failed! > > > > Also when i do "semodule -l" i could not see any module resmgr. > > So that's the problem - you didn't install it? Or you didn't include it > in your base? > > > I m actually trying to insert a new class gconf (making gconf-daemon > > an userspace object manager). > > For this i have downloaded the refpolicy > > > > refpolicy-20080702.tar.bz2 from > > http://oss.tresys.com/projects/refpolicy/wiki/DownloadRelease and > > installed it. > > > > Then from /etc/selinux/refpolicy/src/policy/policy/flask directory i > > m editing the security_classes and access_vectors files to add my new > > gconf class and permissions, then rebuilding and installing the > > policy. > > The whenever i m giving the class gconf in my module .te file and > > trying to install it i m getting this error.I guess i m missing > > something.PLease help. > > I think we'd have to see your module .te file. > And maybe your modules.conf. > > -- > Stephen Smalley > National Security Agency > > ------=_Part_8841_23874916.1220017682474 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

>So that's the problem - you didn't install it?  Or you didn't include it
>in your base?
 
No.I didn't installed it,neither did anything to include it in base.Actually i m not aware what this module is required for.Previouly while inserting any module didn't got this erorr.
 

>I think we'd have to see your module .te file
 
This is my .te file
 
 policy_module(dbus_exe,1.0.0)
########################################
#
# Declarations
#
require{
type system_dbusd_t;
class dbus acquire_svc;
class dbus send_msg;
class gconf set_value;
}
type dbus_exe_t;
type dbus_exe_exec_t;
domain_type(dbus_exe_t)
init_daemon_domain(dbus_exe_t, dbus_exe_exec_t)
domtrans_pattern(unconfined_t,dbus_exe_exec_t,dbus_exe_t)
role unconfined_r types dbus_exe_t;
########################################
#
# dbus_exe local policy
#
# Check in /etc/selinux/refpolicy/include for macros to use instead of allow rules.
# Some common macros (you might be able to remove some)
files_read_etc_files(dbus_exe_t)
libs_use_ld_so(dbus_exe_t)
libs_use_shared_libs(dbus_exe_t)
miscfiles_read_localization(dbus_exe_t)
dbus_system_bus_client_template(dbus_exe,dbus_exe_t)
## internal communication is often done using fifo and unix sockets.
allow dbus_exe_t self:fifo_file { read write };
allow dbus_exe_t self:unix_stream_socket create_stream_socket_perms;
allow dbus_exe_t system_dbusd_t:dbus { send_msg };
allow dbus_exe_t self:dbus {acquire_svc send_msg};
allow dbus_exe_t self:chr_file {getattr read write};
allow dbus_exe_t devpts_t:chr_file {getattr read write};
allow dbus_exe_t self:process {signal};

 
On Fri, Aug 29, 2008 at 6:52 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote:

On Fri, 2008-08-29 at 16:03 +0530, shaunak saha wrote:
> Hi all,
>
> When i m trying to install a module using semodule -i <name of the
> module> i m geting the following error:
>
> libsepol.print_missing_requirements: dbus_rpc_example_server's global
> requirements were not met: type/attribute resmgrd_var_run_t

So your module has a require on that type (presumably by using an
interface that depends on it), and you don't have that type defined in
your policy.

> libsemanage.semanage_link_sandbox: Link packages failed
> semodule:  Failed!
>
> Also when i do "semodule -l" i could not see any module resmgr.

So that's the problem - you didn't install it?  Or you didn't include it
in your base?

> I m actually trying to insert a new class gconf (making gconf-daemon
> an userspace object manager).
> For this i have downloaded the refpolicy
>
> refpolicy-20080702.tar.bz2 from
> http://oss.tresys.com/projects/refpolicy/wiki/DownloadRelease and
> installed it.
>
> Then from  /etc/selinux/refpolicy/src/policy/policy/flask directory i
> m editing the security_classes and access_vectors files to add my new
> gconf class and permissions, then rebuilding and installing the
> policy.
> The whenever i m giving the class gconf in my module .te file and
> trying to install it i m getting this error.I guess i m missing
> something.PLease help.

I think we'd have to see your module .te file.
And maybe your modules.conf.

--
Stephen Smalley
National Security Agency


------=_Part_8841_23874916.1220017682474-- -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message.