Remove excessive logging
Remove excessive logging in process_executor. Remove minijail_log_seccomp_filter_failures.
Move excessive logging in process_executor behind a debug flag in authpolicyd_flags.
Maybe instead of removing excessive logging we should add a knob to control the amount of logging?
Yes, we'll do that, now that we have debug flags.
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/f44987e74c0c478151a37132aa8ac6f1cc3d9dc2 commit f44987e74c0c478151a37132aa8ac6f1cc3d9dc2 Author: Lutz Justen <ljusten@chromium.org> Date: Thu Apr 06 12:22:54 2017 authpolicy: Add a way to easily control logging Makes it easy to control debug logs for process executor, Samba net, policy encoding and GPO parsing from one file, log_level.h. BUG= chromium:666691 TEST=Tested with turning logs on and off. Change-Id: I97b537ca6d988dfbe8720e6a872e8d269fd3e85a Reviewed-on: https://chromium-review.googlesource.com/465948 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Roman Sorokin <rsorokin@chromium.org> [modify] https://crrev.com/f44987e74c0c478151a37132aa8ac6f1cc3d9dc2/authpolicy/policy/device_policy_encoder.cc [modify] https://crrev.com/f44987e74c0c478151a37132aa8ac6f1cc3d9dc2/authpolicy/process_executor.cc [modify] https://crrev.com/f44987e74c0c478151a37132aa8ac6f1cc3d9dc2/authpolicy/authpolicy_main.cc [modify] https://crrev.com/f44987e74c0c478151a37132aa8ac6f1cc3d9dc2/authpolicy/samba_interface.cc [modify] https://crrev.com/f44987e74c0c478151a37132aa8ac6f1cc3d9dc2/authpolicy/authpolicy_parser_main.cc [modify] https://crrev.com/f44987e74c0c478151a37132aa8ac6f1cc3d9dc2/authpolicy/policy/user_policy_encoder.cc [add] https://crrev.com/f44987e74c0c478151a37132aa8ac6f1cc3d9dc2/authpolicy/log_level.h
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1 commit d6e9f81b6f9ca641202c250f1761ea1f4122c0e1 Author: Lutz Justen <ljusten@chromium.org> Date: Wed May 24 06:59:24 2017 authpolicy: Add debug flags for logging, turn off by default Adds a class that manages debug flags. Moves the static logging flags over to this class, so that logging can be fully controlled from the flags file at /etc/authpolicyd_flags. Dumps logs on every D-Bus call and at startup if there is a flags file. Turns excessive logging off in beta and stable, only keeps the bare minimum. Keeps verbose logging in other channels, though, to allow debugging without requiring the user to get a test image with writeable rootfs. Expects a JSON file now instead of a custom format to facilitate parsing. Periodically reloads flags, so that flags can be changed without requiring a restart of authpolicyd. Note that this has a negligible performance impact in production since there is usually no flags file that gets loaded. BUG= chromium:666691 TEST=Tested all debug flags. Change-Id: I63e0c55a6ce4e52c1cc089a76a8b842d08bce508 Reviewed-on: https://chromium-review.googlesource.com/508649 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Thiemo Nagel <tnagel@chromium.org> [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/process_executor.cc [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/tgt_manager.h [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/policy/user_policy_encoder.cc [add] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/authpolicy_flags.cc [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/policy/device_policy_encoder.cc [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/policy/preg_policy_encoder.cc [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/process_executor.h [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/jail_helper.cc [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/policy/user_policy_encoder.h [delete] https://crrev.com/977d6ab49c9e66b37bd96550d36124d51954fbfc/authpolicy/log_level.h [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/path_service.cc [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/path_service.h [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/policy/device_policy_encoder.h [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/jail_helper.h [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/samba_interface.cc [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/authpolicy_parser_main.cc [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/samba_helper.cc [add] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/authpolicy_flags_unittest.cc [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/samba_helper.h [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/authpolicy.cc [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/policy/preg_policy_encoder.h [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/proto/authpolicy_containers.proto [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/authpolicy.gyp [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/policy/preg_policy_encoder_unittest.cc [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/policy/device_policy_encoder_unittest.cc [add] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/authpolicy_flags.h [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/tgt_manager.cc [modify] https://crrev.com/d6e9f81b6f9ca641202c250f1761ea1f4122c0e1/authpolicy/samba_interface.h
Further changes are tracked in crbug.com/732339.
Comment 1 by ljusten@chromium.org
, Nov 18 2016