-
Notifications
You must be signed in to change notification settings - Fork 563
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
Set mode 0600 for log files and allow some configuration of logging #316
Comments
Snippets included in the Gentoo bug report are debug-level logs. Debug-delvel logs should be turned off in release build. Clearly it isn't the case. Logging options in the librime build could be misconfigured either by fcitx-rime (owned by Fcitx team) or in Gentoo ebuild. |
Line 19 in 6662a28
librime ebuild in Gentoo does not pass If you consider logging a debugging feature and recommend users to disable it, you should change default value:
But even then, to have reasonable behavior for users explicitly using
Neither Fcitx-RIME nor IBus-RIME directly call any Glog functions or set any Glog variables. |
Taken separately, setting more restrictive file mode is a wanted improvement, and thank you very much for the patch. I need more time to make sure this change works for all platforms/building options, including the case where the optional |
Apparently behavior of
We can change librime ebuild in Gentoo to add |
What do you think about adding an option to CMakeLists.txt?:
|
Nice findings. I agree that by default the Gentoo package should be built with debug features off. |
Gentoo uses Suggested More importantly, could you accept the change in |
Ping. If you dislike change proposed for |
Sorry for the late reply. I'll simply skip that issue and test your file-mode patch in Windows, macOS and any Linux distro at hand, so make sure it doesn't break anything before merging. |
You do not actually need to have Gentoo for testing. If cmake is called for librime with
If cmake is called for librime with
If cmake is called for librime with
|
There is a blocking build failure in PR #328 due to using old version of gflags library in ubuntu trusty. I'm going to try upgrading the travis image first. |
I suspect that you might want to support older versions of Glog library, in which case probably something like the following can help:
|
Creating log files readable for other users is insecure in case of LibRIME library, since all text entered when RIME is enabled can be found in these log files. I suggest to set mode 0600. Glog library respects
FLAGS_logfile_mode
global variable.Log files for INFO log level can be huge. Short usage of Fcitx-RIME creates
rime.fcitx-rime.….log.INFO.…
with size about 200 MiB andrime.fcitx-rime.….log.WARNING.…
with size about 1.5 MiB. I suggest that LibRIME library expose ability to set minimal log level which could be used by consumers of LibRIME library (e.g. Fcitx-RIME, IBus-RIME). Glog library respectsFLAGS_minloglevel
global variable.Ability to use custom log directory may be also useful. Glog library respects
FLAGS_log_dir
global variable.Patch: librime-logging_configuration.patch.txt
Gentoo bug: https://bugs.gentoo.org/695702
The text was updated successfully, but these errors were encountered: