Re: UnicodeDecodeError: utf-8 on python semanage -i import

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 29, 2024 at 10:51 AM Stephen Smalley
<stephen.smalley.work@xxxxxxxxx> wrote:
>
> On Mon, Jul 1, 2024 at 1:19 PM Allan Oepping <allan@xxxxxxxxxxxxxx> wrote:
> >
> > Importing a .pp file with the python semanage -i option generates a "UnicodeDecodeError: utf-8" on an up to date Rocky 9 distribution.
> >
> > packages:
> >
> > policycoreutils-python-utils-3.6-2.1.el9.noarch
> > python-unversioned-command-3.9.18-3.el9.noarch
> >
> > The open() in SetImportFile needs the binary "b" option to open the file in binary mode, as the .pp file is not in utf-8 format:
>
> Did you mean to use semodule -i? That's how one imports a policy module.
> Also, patches should be -p1 appliable and include a Signed-off-by: line.

As far as I can tell, semanage expects a text file as input with
commands to execute, not a module file.





[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux