Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-hardened
Navigation:
Lists: gentoo-hardened: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-hardened@g.o
From: "Dominik J. Fischer" <sysadmin@...>
Subject: SELinux module compile error: unknown type
Date: Fri, 28 Sep 2007 20:50:03 +0200
Dear list,

I am running a freshly intalled SELinux system with
sec-policy/selinux-base-policy 20070329 in strict/permissive mode.

When I try to write a TE module for my avc denials the compiler doesn't
resolve the necesary types. For example, considerung the following avc
entry for type consoletype:

vmdefault # dmesg | grep avc
audit(1190988750.096:3): avc:  denied  { read } for  pid=26115
comm="consoletype" name="ld.so.cache" dev=sda1 ino=336323476
scontext=system_u:system_r:consoletype_t tcontext=root:object_r:etc_t
tclass=file
audit(1190988750.096:4): avc:  denied  { getattr } for  pid=26115
comm="consoletype" name="ld.so.cache" dev=sda1 ino=336323476
scontext=system_u:system_r:consoletype_t tcontext=root:object_r:etc_t
tclass=file

My policy module looks like this:

policy_module(local,1.0.0) 
type local_t;
files_read_etc_files(consoletype_t)

When I try to compile, the compiler gives me an unknown type error:

vmdefault include # make -f /usr/share/selinux/strict/include/Makefile 
Compiling strict local module
/usr/bin/checkmodule:  loading policy configuration from tmp/local.tmp
local.te:11:ERROR 'unknown type consoletype_t' at token ';' on line
78133:
        allow consoletype_t etc_t:dir { getattr search read lock
ioctl };
#line 11
/usr/bin/checkmodule:  error(s) encountered while parsing configuration
make: *** [tmp/local.mod] Error 1

Seems to me that the compiler does not resolve the types against the
base policy.

Any ideas? Comments are highly appreciated.

Dominik

-- 
gentoo-hardened@g.o mailing list


Replies:
Re: SELinux module compile error: unknown type
-- Bill Sharer
Navigation:
Lists: gentoo-hardened: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Problems with ssh and PubKeyAuthentication after conversion
Next by thread:
Re: SELinux module compile error: unknown type
Previous by date:
Re: masking linux-headers
Next by date:
Re: SELinux module compile error: unknown type


Updated Jun 17, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.