All of lore.kernel.org
 help / color / mirror / Atom feed
* policy
@ 2001-05-22 23:28 Hugo F. Martinez
  2001-05-23 14:57 ` policy Jon Crowley
  0 siblings, 1 reply; 16+ messages in thread
From: Hugo F. Martinez @ 2001-05-22 23:28 UTC (permalink / raw)
  To: selinux

Hi:
Im  trying to relabel my file system but im getting this kind of errors

....
./set files: invalid context system_u:object_r:cron_log_ti on line
number 368
make: *** [relabel] Error 1

I check the file_contexts but i cant see any clue of where the problem

Thanks in advance.


--
You have received this message because you are subscribed to the selinux 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.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: policy
@ 2001-06-01 14:22 Rajan Ravindran
  2001-06-06 17:47 ` policy Stephen Smalley
  0 siblings, 1 reply; 16+ messages in thread
From: Rajan Ravindran @ 2001-06-01 14:22 UTC (permalink / raw)
  To: selinux


Hi,
While I do relabel my file system, I'm getting some errors as

invalid context system_u:object_r:sysadm_netscape_rw_ti on line number 65

similar errors (by appending 'i' at the end of type field in the context)
at different line numbers.

some days before Hugo F.Martinez claimed the same kind of error, for that
Jon
Crowley replied as it could be a simple typo error. I verified with the
file_contexts in the specified line numbers, I don't see any 'i' at the
end.

Any idea what could be the problem.

Thanks,
Rajan.


Did you modify file_contexts?  It appears that is simply a typo... try
changing that line in file_contexts to the following, note the lack of
"i" on the end:

system_u:object_r:cron_log_t

Jon Crowley




"Hugo F. Martinez" wrote:
>
> Hi:
> Im  trying to relabel my file system but im getting this kind of errors
>
> ....
> ./set files: invalid context system_u:object_r:cron_log_ti on line
> number 368
> make: *** [relabel] Error 1
>
> I check the file_contexts but i cant see any clue of where the problem
>
> Thanks in advance.
>
> --
> You have received this message because you are subscribed to the selinux
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.

--
You have received this message because you are subscribed to the selinux
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.





--
You have received this message because you are subscribed to the selinux 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.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Policy
@ 2002-04-03 19:38 Westerman, Mark
  2002-04-03 20:11 ` Policy Russell Coker
  0 siblings, 1 reply; 16+ messages in thread
From: Westerman, Mark @ 2002-04-03 19:38 UTC (permalink / raw)
  To: 'Howard Holm', Russell Coker, SeLinux; +Cc: sds, pal

I guess the first step is to standardize the location
of the policy files. 

How about

The Current install of selinux program,lib and information

/usr/local/selinux/
                   bin
                   etc
                   flask
                   include
                   info
                   libexec
                   man
                   sbin
                   share
                   var
                   X11R6
Policy additions
                   policy
                   setfiles
                   share/doc/examples/
                                      policy
                                      setfiles


When performing a make quickinstall the make will not overwrite
/usr/local/selinux/policy
/usr/local/selinux/setfiles
if those directories exist. If the directories do not exist
create them and then populate them with the example policy.

The make will overwrite the example policy files.
/usr/share/doc/examples/policy
/usr/share/doc/examples/setfiles


Mark Westerman

--
You have received this message because you are subscribed to the selinux 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.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* RE: Policy
@ 2002-04-03 20:43 Westerman, Mark
  2002-04-03 21:06 ` Policy Russell Coker
  0 siblings, 1 reply; 16+ messages in thread
From: Westerman, Mark @ 2002-04-03 20:43 UTC (permalink / raw)
  To: 'Russell Coker', 'Howard Holm', SeLinux; +Cc: sds, pal


On Wednesday, April 03, 2002 2:12 PM, Russell wrote:

> How about the following for distributions other than Slackware:
> /usr/bin
> /usr/sbin
> /usr/include/selinux
> /usr/lib
> /usr/share/man
> /etc/policy

The reason I was putting every thing under /usr/local/selinux
was to get away from any distributions quirks. I really
have no argument about where to put the files, I would
like a consciences. Also we have to get the folks at the NSA
to agree.

I want to start building packages for selinux, I just don't
want to do a lot of rework when the location changes. I do think
we should find some place beside the source tree location. If I 
build a binary package (rpm .....) for installation a standard location
for the policy files would be nice. 

I do like Russell's Idea about two separate locations for the 
policy files. 

> 
> > When performing a make quickinstall the make will not overwrite
> > /usr/local/selinux/policy
> > /usr/local/selinux/setfiles
> > if those directories exist. If the directories do not exist
> > create them and then populate them with the example policy.
> >
> > The make will overwrite the example policy files.
> > /usr/share/doc/examples/policy
> > /usr/share/doc/examples/setfiles
> 
> s/doc/doc\/selinux/ for non-Slackware.
> 

--
You have received this message because you are subscribed to the selinux 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.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* policy
@ 2003-04-03 19:49 Russell Coker
  0 siblings, 0 replies; 16+ messages in thread
From: Russell Coker @ 2003-04-03 19:49 UTC (permalink / raw)
  To: SE Linux

can_exec(crond_t, sbin_t);
Why was the above rule added to crond.te?

allow $1_t sshd_tmp_t:file create_file_perms;
The above rule from macros/user_macros.te looks dangerous.  We have the type 
sshd_tmp_t being used for all user domains.

Could the following please be added to initrc.fc:
/etc/nologin.*                 system_u:object_r:etc_runtime_t
/etc/nohotplug                 system_u:object_r:etc_runtime_t

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


--
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.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: policy
@ 2003-04-03 22:01 Stephen D. Smalley
  2003-04-03 21:58 ` policy Russell Coker
  0 siblings, 1 reply; 16+ messages in thread
From: Stephen D. Smalley @ 2003-04-03 22:01 UTC (permalink / raw)
  To: selinux, russell


> can_exec(crond_t, sbin_t);
> Why was the above rule added to crond.te?

Good question.  Looks like a mistake when they removed can_exec_any
from system_crond_t and were adding individual can_exec rules.

> allow $1_t sshd_tmp_t:file create_file_perms;
> The above rule from macros/user_macros.te looks dangerous.  We have the type 
> sshd_tmp_t being used for all user domains.

Agreed, I've removed this from our internal tree.  It appears that this
is also granted to some program domains, e.g. the su domains and the
ssh client domains.

> Could the following please be added to initrc.fc:
> /etc/nologin.*                 system_u:object_r:etc_runtime_t
> /etc/nohotplug                 system_u:object_r:etc_runtime_t

Yes, I've made this change to our internal tree.

--
Stephen Smalley, NSA



--
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.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* policy
@ 2005-01-02 15:01 Russell Coker
  2005-01-05 16:48 ` policy James Carter
  0 siblings, 1 reply; 16+ messages in thread
From: Russell Coker @ 2005-01-02 15:01 UTC (permalink / raw)
  To: SE-Linux

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

udev.diff just combines a couple of lines into a single line.

diff changes the Makefile to have it not run setfiles -q needlessly (good for 
when a script runs "make install" a few hundred times).

Adds a couple of lines to assert.te.

Adds hide_broken_symptoms to ldconfig.te (there is no good cause for 
ldconfig_t to access a TCP socket).

Changes ftpd.te to allow access to home_root_t for the case of NFS root.  This 
means that if you have home directories individually mounted on /home/user 
then things will still work (and there's no harm in granting such access).

Added some extra access that seems to be needed by the latest version of howl.

Removed the memory_device_t commend from xdm.te - we should not need to 
re-enable that.

Removed redundant entries from types.fc relating to the old locations 
before /etc/selinux was used.

Add support for the Debian locations for pmap_dump and pmap_set.  I wonder 
whether those files will have to change locations in other distributions for 
the case of /usr on NFS...

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page

[-- Attachment #2: udev.diff --]
[-- Type: text/x-diff, Size: 687 bytes --]

--- udev.te	2004-12-03 19:49:24.000000000 +1100
+++ udev.te.new	2005-01-02 23:23:30.000000000 +1100
@@ -44,7 +44,7 @@
 # for arping used for static IP addresses on PCMCIA ethernet
 domain_auto_trans(udev_t, netutils_exec_t, netutils_t)
 ')
-allow udev_t etc_t:file { getattr read };
+allow udev_t etc_t:file { getattr read ioctl };
 allow udev_t { bin_t sbin_t }:dir r_dir_perms;
 allow udev_t { sbin_t bin_t }:lnk_file read;
 allow udev_t bin_t:lnk_file read;
@@ -80,7 +80,6 @@
 ')
 allow udev_t devpts_t:dir { getattr search };
 allow udev_t etc_runtime_t:file { getattr read };
-allow udev_t etc_t:file ioctl;
 ifdef(`xdm.te', `
 allow udev_t xdm_var_run_t:file { getattr read };
 ')

[-- Attachment #3: diff --]
[-- Type: text/x-diff, Size: 5220 bytes --]

--- /usr/src/se/policy/Makefile	2004-12-23 19:14:12.000000000 +1100
+++ Makefile.new	2005-01-02 23:05:18.000000000 +1100
@@ -72,10 +72,12 @@
 
 ROOTFILES = $(addprefix $(APPDIR)/users/,root)
 
-install: $(APPFILES) $(ROOTFILES) $(LOADPATH) $(FCPATH) $(USERPATH)/system.users $(USERPATH)/local.users
+tmp/valid_fc: $(APPFILES) $(ROOTFILES) $(LOADPATH) $(FCPATH) $(USERPATH)/system.users $(USERPATH)/local.users
 	@echo "Validating file_contexts ..."	
 	$(SETFILES) -q -c $(LOADPATH) $(FCPATH)
 
+install: tmp/valid_fc
+
 $(CONTEXTPATH)/files/media: appconfig/media
 	mkdir -p $(CONTEXTPATH)/files/
 	install -m 644 $< $@
--- /usr/src/se/policy/assert.te	2004-12-13 09:55:20.000000000 +1100
+++ assert.te	2004-12-25 04:35:51.000000000 +1100
@@ -124,6 +124,8 @@
 ifdef(`ypbind.te', `assert_execute(ypbind)')
 ifdef(`xfs.te', `assert_execute(xfs)')
 ifdef(`gpm.te', `assert_execute(gpm)')
+ifdef(`ifconfig.te', `assert_execute(ifconfig)')
+ifdef(`iptables.te', `assert_execute(iptables)')
 
 ifdef(`login.te', `
 neverallow { local_login_t remote_login_t } ~{ login_exec_t ifdef(`pam.te', `pam_exec_t') }:file entrypoint;
--- /usr/src/se/policy/domains/program/ldconfig.te	2004-12-13 09:55:21.000000000 +1100
+++ domains/program/ldconfig.te	2004-12-23 19:24:00.000000000 +1100
@@ -44,6 +44,8 @@
 ')
 
 allow ldconfig_t proc_t:file read;
+ifdef(`hide_broken_symptoms', `
 ifdef(`unconfined.te',`
 dontaudit ldconfig_t unconfined_t:tcp_socket { read write };
-');
+')
+')dnl end hide_broken_symptoms
--- /usr/src/se/policy/domains/program/unused/ftpd.te	2004-11-21 21:51:13.000000000 +1100
+++ ./domains/program/unused/ftpd.te	2004-12-01 14:35:19.000000000 +1100
@@ -96,16 +99,14 @@
 # Allow ftp to read/write files in the user home directories.
 bool ftp_home_dir false;
 
+if (ftp_home_dir) {
+# allow access to /home
+allow ftpd_t home_root_t:dir { getattr search };
+}
+
 if (ftp_home_dir && use_nfs_home_dirs) {
 allow ftpd_t nfs_t:dir r_dir_perms;
 allow ftpd_t nfs_t:file r_file_perms;
-# dont allow access to /home
-dontaudit ftpd_t home_root_t:dir { getattr search };
-} 
-else 
-{
-# allow access to /home
-allow ftpd_t home_root_t:dir { getattr search };
 }
 dontaudit ftpd_t selinux_config_t:dir search;
 #
--- /usr/src/se/policy/domains/program/unused/howl.te	2004-12-03 19:49:23.000000000 +1100
+++ ./domains/program/unused/howl.te	2004-12-25 04:01:00.000000000 +1100
@@ -4,8 +4,8 @@
 #
 
 daemon_domain(howl)
-allow howl_t proc_net_t:dir search;
-allow howl_t proc_net_t:file {getattr read };
+allow howl_t proc_net_t:dir r_dir_perms;
+allow howl_t proc_net_t:file { getattr read };
 can_network_server(howl_t)
 can_ypbind(howl_t)
 allow howl_t self:capability { kill net_admin };
@@ -15,6 +15,8 @@
 type howl_port_t, port_type;
 allow howl_t howl_port_t:{ udp_socket tcp_socket } name_bind;
 
+allow howl_t self:unix_dgram_socket create_socket_perms;
+
 allow howl_t etc_t:file { getattr read };
 allow howl_t initrc_var_run_t:file rw_file_perms;
 
--- /usr/src/se/policy/domains/program/unused/rpm.te	2004-11-21 21:51:14.000000000 +1100
+++ ./domains/program/unused/rpm.te	2004-11-22 03:14:43.000000000 +1100
@@ -66,6 +66,11 @@
 domain_auto_trans(rpm_script_t, cupsd_exec_t, cupsd_t)
 ')
 
+ifdef(`gpg.te', `
+# gpg wants this so it does not dump core on errors
+allow rpm_t self:process { setrlimit };
+')
+
 # for a bug in rm
 dontaudit initrc_t pidfile:file write;
 
--- /usr/src/se/policy/domains/program/unused/xdm.te	2004-12-13 09:55:25.000000000 +1100
+++ domains/program/unused/xdm.te	2005-01-02 23:29:29.000000000 +1100
@@ -70,10 +70,6 @@
 # Use capabilities.
 allow xdm_t self:capability { setgid setuid sys_resource kill sys_tty_config mknod chown dac_override dac_read_search fowner fsetid ipc_owner };
 
-# Use /dev/mem.
-# Commented out by default.
-#allow xdm_t memory_device_t:chr_file { execute read write };
-
 allow xdm_t { urandom_device_t random_device_t }:chr_file { getattr read ioctl };
 
 # Transition to user domains for user sessions.
--- /usr/src/se/policy/file_contexts/types.fc	2004-12-13 09:55:26.000000000 +1100
+++ file_contexts/types.fc	2005-01-02 23:38:16.000000000 +1100
@@ -302,11 +299,6 @@
 /etc/resolv\.conf.*	--	system_u:object_r:net_conf_t
 
 /etc/selinux(/.*)?		system_u:object_r:selinux_config_t
-/etc/security/selinux(/.*)?	system_u:object_r:policy_config_t	
-/etc/security/selinux/src(/.*)?	system_u:object_r:policy_src_t
-/etc/security/default_contexts.*	system_u:object_r:default_context_t
-/etc/services		--	system_u:object_r:etc_t
-
 /etc/selinux/[^/]*/policy(/.*)?	system_u:object_r:policy_config_t
 /etc/selinux/[^/]*/src(/.*)?	system_u:object_r:policy_src_t
 /etc/selinux/[^/]*/contexts(/.*)?	system_u:object_r:default_context_t
--- /usr/src/se/policy/file_contexts/program/portmap.fc	2004-12-13 09:55:29.000000000 +1100
+++ file_contexts/program/portmap.fc	2005-01-02 23:46:07.000000000 +1100
@@ -1,4 +1,9 @@
 # portmap
 /sbin/portmap		--	system_u:object_r:portmap_exec_t
+ifdef(`distro_debian', `
+/sbin/pmap_dump		--	system_u:object_r:portmap_helper_exec_t
+/sbin/pmap_set		--	system_u:object_r:portmap_helper_exec_t
+', `
 /usr/sbin/pmap_dump	--	system_u:object_r:portmap_helper_exec_t
 /usr/sbin/pmap_set	--	system_u:object_r:portmap_helper_exec_t
+')

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2005-01-05 16:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-22 23:28 policy Hugo F. Martinez
2001-05-23 14:57 ` policy Jon Crowley
  -- strict thread matches above, loose matches on Subject: below --
2001-06-01 14:22 policy Rajan Ravindran
2001-06-06 17:47 ` policy Stephen Smalley
2002-04-03 19:38 Policy Westerman, Mark
2002-04-03 20:11 ` Policy Russell Coker
2002-04-03 20:43 Policy Westerman, Mark
2002-04-03 21:06 ` Policy Russell Coker
2002-04-03 22:04   ` Policy Howard Holm
2002-04-03 22:30   ` Policy Dale Amon
2002-04-03 22:57     ` Policy Russell Coker
2003-04-03 19:49 policy Russell Coker
2003-04-03 22:01 policy Stephen D. Smalley
2003-04-03 21:58 ` policy Russell Coker
2005-01-02 15:01 policy Russell Coker
2005-01-05 16:48 ` policy James Carter

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.