|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
fixfiles -F optionHello List.
I have an rpm for an selinux policy for a custom CentOS 5.3 distribution. When I install it, I use pre/post install scripts to back up the previous file contexts and run "fixfiles -C ${FILE_CONTEXT}.pre restore" as in the standard selinux-policy-targeted rpm. On an upgrade, old httpd_sys_content_t files are not being updated to public_content_rw_t because httpd_sys_content_t is in the customizable_types file. According to the fixfiles man page, -F should "Force reset of context to match file_context for customizable files", but when I added it, it made no difference. I had a look at the fixfiles script, and indeed it looks as if -F doesn't work with -C. Is that correct, or did I miss something? Is there a recommended way to do that? Moray. "To err is human. To purr, feline" -- fedora-selinux-list mailing list fedora-selinux-list@... https://www.redhat.com/mailman/listinfo/fedora-selinux-list |
|
|
Re: fixfiles -F optionOn 10/05/2009 10:20 AM, Moray Henderson (ICT) wrote:
> Hello List. > > I have an rpm for an selinux policy for a custom CentOS 5.3 distribution. When I install it, I use pre/post install scripts to back up the previous file contexts and run "fixfiles -C ${FILE_CONTEXT}.pre restore" as in the standard selinux-policy-targeted rpm. > > On an upgrade, old httpd_sys_content_t files are not being updated to public_content_rw_t because httpd_sys_content_t is in the customizable_types file. > > According to the fixfiles man page, -F should "Force reset of context to match file_context for customizable files", but when I added it, it made no difference. I had a look at the fixfiles script, and indeed it looks as if -F doesn't work with -C. Is that correct, or did I miss something? > > Is there a recommended way to do that? > > > Moray. > "To err is human. To purr, feline" > > > > -- > fedora-selinux-list mailing list > fedora-selinux-list@... > https://www.redhat.com/mailman/listinfo/fedora-selinux-list > > -- fedora-selinux-list mailing list fedora-selinux-list@... https://www.redhat.com/mailman/listinfo/fedora-selinux-list |
|
|
RE: fixfiles -F optionDaniel wrote:
>On 10/05/2009 10:20 AM, Moray Henderson (ICT) wrote: >> Hello List. >> >> I have an rpm for an selinux policy for a custom CentOS 5.3 distribution. >When I install it, I use pre/post install scripts to back up the previous >file contexts and run "fixfiles -C ${FILE_CONTEXT}.pre restore" as in the >standard selinux-policy-targeted rpm. >> >> On an upgrade, old httpd_sys_content_t files are not being updated to >public_content_rw_t because httpd_sys_content_t is in the >customizable_types file. >> >> According to the fixfiles man page, -F should "Force reset of context to >match file_context for customizable files", but when I added it, it made >no difference. I had a look at the fixfiles script, and indeed it looks >as if -F doesn't work with -C. Is that correct, or did I miss something? >> >> Is there a recommended way to do that? >> >> >> Moray. >> "To err is human. To purr, feline" >> >> >Fix fixfiles and send a patch. :^( Sorry for delay - I was at a training course, then recovering from the cold I caught at the training course... I am working on fixing the fixfiles script, but it looks more complicated than I thought, as I'm also trying to bring the usage info and man page into line with how the script actually behaves. As far as I can see, the "-o outputfile" option has never worked: it just adds the name of the output file to the restorecon or setfiles commands without the -o option to say that it's an output option. In addition, it won't work at all with the verify command because that uses its own -o option. I would therefore vote for removing -o from fixfiles altogether, but if you really want it there and working, I'll see what I can do. Let me know what you think. In addition to fixfiles, I have also documented the -p option to both restorecon and setfiles, and brought their usage info and man pages into line. Moray. "To err is human. To purr, feline" -- fedora-selinux-list mailing list fedora-selinux-list@... https://www.redhat.com/mailman/listinfo/fedora-selinux-list |
|
|
Re: fixfiles -F optionOn 10/20/2009 10:14 AM, Moray Henderson (ICT) wrote:
> Daniel wrote: >> On 10/05/2009 10:20 AM, Moray Henderson (ICT) wrote: >>> Hello List. >>> >>> I have an rpm for an selinux policy for a custom CentOS 5.3 distribution. >> When I install it, I use pre/post install scripts to back up the previous >> file contexts and run "fixfiles -C ${FILE_CONTEXT}.pre restore" as in the >> standard selinux-policy-targeted rpm. >>> >>> On an upgrade, old httpd_sys_content_t files are not being updated to >> public_content_rw_t because httpd_sys_content_t is in the >> customizable_types file. >>> >>> According to the fixfiles man page, -F should "Force reset of context to >> match file_context for customizable files", but when I added it, it made >> no difference. I had a look at the fixfiles script, and indeed it looks >> as if -F doesn't work with -C. Is that correct, or did I miss something? >>> >>> Is there a recommended way to do that? >>> >>> >>> Moray. >>> "To err is human. To purr, feline" >>> >>> >> Fix fixfiles and send a patch. :^( > > Sorry for delay - I was at a training course, then recovering from the cold I caught at the training course... > > I am working on fixing the fixfiles script, but it looks more complicated than I thought, as I'm also trying to bring the usage info and man page into line with how the script actually behaves. > > As far as I can see, the "-o outputfile" option has never worked: it just adds the name of the output file to the restorecon or setfiles commands without the -o option to say that it's an output option. In addition, it won't work at all with the verify command because that uses its own -o option. > > I would therefore vote for removing -o from fixfiles altogether, but if you really want it there and working, I'll see what I can do. Let me know what you think. > > In addition to fixfiles, I have also documented the -p option to both restorecon and setfiles, and brought their usage info and man pages into line. > > > Moray. > "To err is human. To purr, feline" > > -- > fedora-selinux-list mailing list > fedora-selinux-list@... > https://www.redhat.com/mailman/listinfo/fedora-selinux-list > > -- fedora-selinux-list mailing list fedora-selinux-list@... https://www.redhat.com/mailman/listinfo/fedora-selinux-list |
|
|
RE: fixfiles -F optionHi Daniel,
Here are my patches for fixfiles and the documentation. The restorecon & setfiles patches are simple: document the -p option and bring usage and man pages into line. The fixfiles patch: - enables -F with -C - removes -o option - corrects "[-F] relabel" in man page - brings man page and usage into line with script behaviour It is still possible to combine fixfiles options that don't make sense together, such as -R with relabel, or -R with -C, but at least the right combinations are in the documentation. These patches were made against policycoreutils-1.33.12-14.2.el5.src.rpm, but most of the fixes are still valid against the fc11 version. I hope you like them ;-) Moray. "To err is human. To purr, feline" -- fedora-selinux-list mailing list fedora-selinux-list@... https://www.redhat.com/mailman/listinfo/fedora-selinux-list |
|
|
Re: fixfiles -F optionOn 10/21/2009 11:54 AM, Moray Henderson (ICT) wrote:
> Hi Daniel, > > Here are my patches for fixfiles and the documentation. > > The restorecon & setfiles patches are simple: document the -p option and bring usage and man pages into line. > > The fixfiles patch: > - enables -F with -C > - removes -o option > - corrects "[-F] relabel" in man page > - brings man page and usage into line with script behaviour > > It is still possible to combine fixfiles options that don't make sense together, such as -R with relabel, or -R with -C, but at least the right combinations are in the documentation. > > These patches were made against policycoreutils-1.33.12-14.2.el5.src.rpm, but most of the fixes are still valid against the fc11 version. > > I hope you like them ;-) > > > Moray. > "To err is human. To purr, feline" Thank you. -- fedora-selinux-list mailing list fedora-selinux-list@... https://www.redhat.com/mailman/listinfo/fedora-selinux-list |
| Free embeddable forum powered by Nabble | Forum Help |