From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <43CD39FE.1030609@cornell.edu> Date: Tue, 17 Jan 2006 11:39:58 -0700 From: Ivan Gyurdiev MIME-Version: 1.0 To: Daniel J Walsh CC: SE Linux , Stephen Smalley Subject: Re: Why are we managing seusers file via libsemanage? References: <43CC6953.4060901@redhat.com> <43CCA359.8030109@cornell.edu> <43CD3129.6060405@redhat.com> In-Reply-To: <43CD3129.6060405@redhat.com> Content-Type: multipart/mixed; boundary="------------040509090600050203070701" Sender: owner-selinux@tycho.nsa.gov List-Id: selinux@tycho.nsa.gov This is a multi-part message in MIME format. --------------040509090600050203070701 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > 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. --------------040509090600050203070701 Content-Type: text/x-patch; name="libsemanage.autogen_header.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libsemanage.autogen_header.diff" 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; --------------040509090600050203070701-- -- 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.