All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem relabeling journalfile
@ 2003-09-15 14:50 Dale Amon
  2003-09-15 14:53 ` Stephen Smalley
  0 siblings, 1 reply; 7+ messages in thread
From: Dale Amon @ 2003-09-15 14:50 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: Dale Amon, SELinux Mail List

I've upgraded an ext2 to an ext3 file and while make relabeling
I get an error message:

/usr/sbin/setfiles: unable to relabel /.journal to system_u:object_r:file_t

suggestions?




--
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] 7+ messages in thread

* Re: Problem relabeling journalfile
  2003-09-15 14:50 Problem relabeling journalfile Dale Amon
@ 2003-09-15 14:53 ` Stephen Smalley
  2003-09-15 15:29   ` Dale Amon
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Smalley @ 2003-09-15 14:53 UTC (permalink / raw)
  To: Dale Amon; +Cc: SELinux Mail List

On Mon, 2003-09-15 at 10:50, Dale Amon wrote:
> I've upgraded an ext2 to an ext3 file and while make relabeling
> I get an error message:
> 
> /usr/sbin/setfiles: unable to relabel /.journal to system_u:object_r:file_t
> 
> suggestions?

Add an entry for it to your file_contexts configuration with the special
notation "<<none>>" in place of the security context.  This tells
setfiles to ignore it.

-- 
Stephen Smalley <sds@epoch.ncsc.mil>
National Security Agency


--
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] 7+ messages in thread

* Re: Problem relabeling journalfile
  2003-09-15 14:53 ` Stephen Smalley
@ 2003-09-15 15:29   ` Dale Amon
  2003-09-15 15:43     ` Stephen Smalley
  2003-09-15 18:40     ` Colin Walters
  0 siblings, 2 replies; 7+ messages in thread
From: Dale Amon @ 2003-09-15 15:29 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: Dale Amon, SELinux Mail List

On Mon, Sep 15, 2003 at 10:53:36AM -0400, Stephen Smalley wrote:
> Add an entry for it to your file_contexts configuration with the special
> notation "<<none>>" in place of the security context.  This tells
> setfiles to ignore it.

Sorted. Thanks.

This might be a reasonable thing to add to standard the file_contexts:

#
# Journal files
/.journal	<<none>>


--
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] 7+ messages in thread

* Re: Problem relabeling journalfile
  2003-09-15 15:29   ` Dale Amon
@ 2003-09-15 15:43     ` Stephen Smalley
  2003-09-15 16:51       ` Russell Coker
  2003-09-15 18:40     ` Colin Walters
  1 sibling, 1 reply; 7+ messages in thread
From: Stephen Smalley @ 2003-09-15 15:43 UTC (permalink / raw)
  To: Dale Amon; +Cc: SELinux Mail List

On Mon, 2003-09-15 at 11:29, Dale Amon wrote:
> This might be a reasonable thing to add to standard the file_contexts:
> 
> #
> # Journal files
> /.journal	<<none>>

Patch below.  Note that you should escape dot since it will otherwise be
interpreted as "any character" by the regular expression matching code,
and we should include entries for common filesystem mount points to
cover most cases, similar to the existing entries for lost+found.  We
can likely drop out the persistent label mapping entries entirely aside
from backward compatibility support for the old SELinux.

Index: policy/file_contexts/types.fc
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/file_contexts/types.fc,v
retrieving revision 1.7
diff -u -r1.7 types.fc
--- policy/file_contexts/types.fc	10 Jul 2003 14:45:07 -0000	1.7
+++ policy/file_contexts/types.fc	15 Sep 2003 15:39:07 -0000
@@ -346,6 +346,17 @@
 /usr/local/\.\.\.security(/.*)?	system_u:object_r:file_labels_t
 
 #
+# Journal files
+#
+/\.journal			<<none>>
+/usr/\.journal			<<none>>
+/boot/\.journal			<<none>>
+/home/\.journal			<<none>>
+/var/\.journal			<<none>>
+/tmp/\.journal			<<none>>
+/usr/local/\.journal		<<none>>
+
+#
 # Lost and found directories.
 #
 /lost\+found(/.*)?		system_u:object_r:lost_found_t



-- 
Stephen Smalley <sds@epoch.ncsc.mil>
National Security Agency


--
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] 7+ messages in thread

* Re: Problem relabeling journalfile
  2003-09-15 15:43     ` Stephen Smalley
@ 2003-09-15 16:51       ` Russell Coker
  2003-09-15 17:46         ` Stephen Smalley
  0 siblings, 1 reply; 7+ messages in thread
From: Russell Coker @ 2003-09-15 16:51 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: SELinux Mail List

On Tue, 16 Sep 2003 01:43, Stephen Smalley wrote:
> Patch below.  Note that you should escape dot since it will otherwise be
> interpreted as "any character" by the regular expression matching code,
> and we should include entries for common filesystem mount points to
> cover most cases, similar to the existing entries for lost+found.  We
> can likely drop out the persistent label mapping entries entirely aside
> from backward compatibility support for the old SELinux.

Do you think it would be beneficial to have a method of specifying rules that 
apply relative to the root of a file system instead of to the root?

EG:
FS/.journal
FS/lost\+found
FS/quota.user
FS/quota.group

With the current operation of setfiles for completeness we have to add such 
entries for every new mount point.  Having setfiles accept such a spec when 
labeling an entire file system would be easy to code, and it wouldn't be 
really difficult to manage the case of "setfiles -s".

-- 
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] 7+ messages in thread

* Re: Problem relabeling journalfile
  2003-09-15 16:51       ` Russell Coker
@ 2003-09-15 17:46         ` Stephen Smalley
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Smalley @ 2003-09-15 17:46 UTC (permalink / raw)
  To: Russell Coker; +Cc: SELinux Mail List

On Mon, 2003-09-15 at 12:51, Russell Coker wrote:
> Do you think it would be beneficial to have a method of specifying rules that 
> apply relative to the root of a file system instead of to the root?
> 
> EG:
> FS/.journal
> FS/lost\+found
> FS/quota.user
> FS/quota.group
> 
> With the current operation of setfiles for completeness we have to add such 
> entries for every new mount point.  Having setfiles accept such a spec when 
> labeling an entire file system would be easy to code, and it wouldn't be 
> really difficult to manage the case of "setfiles -s".

You might be able to leverage the altroot support contributed by the
Hardened Gentoo developers to achieve the same effect without altering
the specification itself.

-- 
Stephen Smalley <sds@epoch.ncsc.mil>
National Security Agency


--
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] 7+ messages in thread

* Re: Problem relabeling journalfile
  2003-09-15 15:29   ` Dale Amon
  2003-09-15 15:43     ` Stephen Smalley
@ 2003-09-15 18:40     ` Colin Walters
  1 sibling, 0 replies; 7+ messages in thread
From: Colin Walters @ 2003-09-15 18:40 UTC (permalink / raw)
  To: Dale Amon; +Cc: SELinux Mail List

On Mon, 2003-09-15 at 11:29, Dale Amon wrote:
> On Mon, Sep 15, 2003 at 10:53:36AM -0400, Stephen Smalley wrote:
> > Add an entry for it to your file_contexts configuration with the special
> > notation "<<none>>" in place of the security context.  This tells
> > setfiles to ignore it.
> 
> Sorted. Thanks.
> 
> This might be a reasonable thing to add to standard the file_contexts:
> 
> #
> # Journal files
> /.journal	<<none>>

I ran into this same issue a while back, and someone (I forget who now)
gave me the tip that if you boot from a different medium and run
'tune2fs /dev/hdX' with a recent enough tune2fs, it will automatically
hide the .journal inode.


--
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] 7+ messages in thread

end of thread, other threads:[~2003-09-15 18:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-15 14:50 Problem relabeling journalfile Dale Amon
2003-09-15 14:53 ` Stephen Smalley
2003-09-15 15:29   ` Dale Amon
2003-09-15 15:43     ` Stephen Smalley
2003-09-15 16:51       ` Russell Coker
2003-09-15 17:46         ` Stephen Smalley
2003-09-15 18:40     ` Colin Walters

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.