-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
broken setting of log level in libsepol? #176
Comments
cil_set_log_level(), called by secilc or secil2conf with a level that can be incremented by passing one or more -v options? |
I needed it from |
Probably semodule should be patched to call cil_set_log_level() with a value based on its existing -v option, which presently only controls its own logging. |
perfinion
added a commit
to perfinion/selinux
that referenced
this issue
Oct 21, 2019
semodule -v will turn on semodule's own verbose logging but not logging from CIL. This change makes the verbose flag also set cil's log level. By default (ie no -v flag), this will enable CIL_ERR, and each -v will increase the level from there. Tested with a duplicated fcontext in the policy. Before this change: # semodule -v -B Committing changes: Problems processing filecon rules Failed post db handling semodule: Failed! After this change: # semodule -v -B [ ... snip ... ] Found conflicting filecon rules at /var/lib/selinux/mcs/tmp/modules/400/mycustom/cil:159 at /var/lib/selinux/mcs/tmp/modules/400/mycustom/cil:158 Problems processing filecon rules Failed post db handling semodule: Failed! Closes: SELinuxProject#176 Signed-off-by: Jason Zaman <jason@perfinion.com>
stephensmalley
pushed a commit
to stephensmalley/selinux
that referenced
this issue
Oct 21, 2019
semodule -v will turn on semodule's own verbose logging but not logging from CIL. This change makes the verbose flag also set cil's log level. By default (ie no -v flag), this will enable CIL_ERR, and each -v will increase the level from there. Tested with a duplicated fcontext in the policy. Before this change: # semodule -v -B Committing changes: Problems processing filecon rules Failed post db handling semodule: Failed! After this change: # semodule -v -B [ ... snip ... ] Found conflicting filecon rules at /var/lib/selinux/mcs/tmp/modules/400/mycustom/cil:159 at /var/lib/selinux/mcs/tmp/modules/400/mycustom/cil:158 Problems processing filecon rules Failed post db handling semodule: Failed! Closes: SELinuxProject#176 Signed-off-by: Jason Zaman <jason@perfinion.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wanted to set maximum log level in
semodule
(libsepol
). Grepped the source code and it seemed me thatlvl
is always1
and there is no way to change it via cli.So I had to patch it to get maximum log level.
Please correct me if I'm wrong.
The text was updated successfully, but these errors were encountered: