Repository navigation
Rebuild fapolicyd-magic.mgc on service start up - #442
Open
bachradsusi wants to merge 1 commit into
Open
bachradsusi wants to merge 1 commit into
bachradsusi wants to merge 1 commit into
Conversation
Sometimes file's libmagic can dump the compiled magic-file format
version (VERSIONNO) which has an effect that fapolicyd-magic.mgc generated
during fapolicyd becomes invalid and fapolicyd is not able to start anymore.
With this change, /usr/share/fapolicyd/fapolicyd-magic is installed together
with /usr/share/fapolicyd/fapolicyd-magic.mgc so that it's possible to
regenerate .mgc file during fapolicyd.service startup.
ExecStartPre command is used with '-' in order not to break startup on systems
with read only '/usr'
Fixes:
/usr/share/fapolicyd/fapolicyd-magic.mgc, 1: Warning: offset `�' invalid
/usr/share/fapolicyd/fapolicyd-magic.mgc, 2: Warning: offset `' invalid
/usr/share/fapolicyd/fapolicyd-magic.mgc, 4: Warning: offset `
o' invalid
Unable to load fast magic database
Member
Author
Member
|
Wouldn't it be better to just make the rpm dependency tighter? One effect I can't really tell is where does the newly compiled magic file live? We can't really put it in /usr/share because that could be mounted readonly or NFS. So, we'd need to put it in /var somewhere or /etc. We'd need to ghost the file, too. If the dependencies were tighter, then we'd still get the bz filed but it would be that we're preventing an upgrade which is not as bad. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sometimes file's libmagic can dump the compiled magic-file format version (VERSIONNO) which has an effect that fapolicyd-magic.mgc generated during fapolicyd becomes invalid and fapolicyd is not able to start anymore.
With this change, /usr/share/fapolicyd/fapolicyd-magic is installed together with /usr/share/fapolicyd/fapolicyd-magic.mgc so that it's possible to regenerate .mgc file during fapolicyd.service startup.
ExecStartPre command is used with '-' in order not to break startup on systems with read only '/usr'
Fixes:
/usr/share/fapolicyd/fapolicyd-magic.mgc, 1: Warning: offset
�' invalid /usr/share/fapolicyd/fapolicyd-magic.mgc, 2: Warning: offset' invalid/usr/share/fapolicyd/fapolicyd-magic.mgc, 4: Warning: offset `