From: Ivan Gyurdiev <ivg2@cornell.edu>
To: Daniel J Walsh <dwalsh@redhat.com>
Cc: SE Linux <selinux@tycho.nsa.gov>, Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: Why are we managing seusers file via libsemanage?
Date: Tue, 17 Jan 2006 11:39:58 -0700 [thread overview]
Message-ID: <43CD39FE.1030609@cornell.edu> (raw)
In-Reply-To: <43CD3129.6060405@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 325 bytes --]
> Ok well the seusers file should indicate that it is machine generated
> and should not be edited then, or can it be eliminated all together.
> Users will edit this file...
Patch attached - please also add the header into the initial seusers
file that gets installed, and into file_contexts.template in the policy.
[-- Attachment #2: libsemanage.autogen_header.diff --]
[-- Type: text/x-patch, Size: 754 bytes --]
diff -Naurp --exclude-from excludes old/libsemanage/src/database_file.c new/libsemanage/src/database_file.c
--- old/libsemanage/src/database_file.c 2006-01-17 09:11:06.000000000 -0700
+++ new/libsemanage/src/database_file.c 2006-01-17 11:26:15.000000000 -0700
@@ -159,6 +159,14 @@ static int dbase_file_flush(
}
__fsetlocking(str, FSETLOCKING_BYCALLER);
+ if (fprintf(str, "# This file is auto-generated by libsemanage\n"
+ "# Please use the semanage command to make "
+ "changes\n\n") < 0) {
+
+ ERR(handle, "could not write file header for %s", fname);
+ goto err;
+ }
+
for (ptr = dbase->llist.cache_tail; ptr != NULL; ptr = ptr->prev) {
if (rftable->print(handle, ptr->data, str) < 0)
goto err;
next prev parent reply other threads:[~2006-01-17 18:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-17 3:49 Why are we managing seusers file via libsemanage? Daniel J Walsh
2006-01-17 5:27 ` Joshua Brindle
2006-01-17 5:33 ` Joshua Brindle
2006-01-17 7:36 ` Ivan Gyurdiev
2006-01-17 8:10 ` Ivan Gyurdiev
2006-01-17 7:16 ` Ivan Gyurdiev
2006-01-17 7:57 ` Ivan Gyurdiev
2006-01-17 18:02 ` Daniel J Walsh
2006-01-17 18:39 ` Ivan Gyurdiev [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-01-17 16:56 schaufler-ca.com - Casey Schaufler
2006-01-17 19:02 ` Ivan Gyurdiev
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=43CD39FE.1030609@cornell.edu \
--to=ivg2@cornell.edu \
--cc=dwalsh@redhat.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
/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.