From 0521393416dddbea6a0800f191b3082a333a15a7 Mon Sep 17 00:00:00 2001 From: Tyler Porter Date: Tue, 27 Feb 2024 01:20:08 -0500 Subject: [PATCH 1/3] Do not drop privilege when running RGBM --- README.md | 1 + utils.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index a2bf8b08..ab275517 100755 --- a/README.md +++ b/README.md @@ -294,6 +294,7 @@ You can configure your LED matrix with the same flags used in the [rpi-rgb-led-m --led-pwm-dither-bits Time dithering of lower bits (Default: 0) --config Specify a configuration file name other, omitting json xtn (Default: config) --emulated Force the scoreboard to run in software emulation mode. +--drop-privileges Force the matrix driver to drop root privileges after setup. (Default: false) ``` ## Personalization diff --git a/utils.py b/utils.py index 05119a72..237b80f6 100644 --- a/utils.py +++ b/utils.py @@ -126,6 +126,9 @@ def args(): help="Force using emulator mode over default matrix display.", const=True ) + parser.add_argument( + "--drop-privileges", action="store_false", help="Force the matrix driver to drop root privileges after setup." + ) return parser.parse_args() @@ -148,6 +151,7 @@ def led_matrix_options(args): options.scan_mode = args.led_scan_mode options.pwm_lsb_nanoseconds = args.led_pwm_lsb_nanoseconds options.led_rgb_sequence = args.led_rgb_sequence + options.drop_privileges = args.drop_privileges try: options.pixel_mapper_config = args.led_pixel_mapper From 8cb23182c72f56ca8ac8f82c828d68131a18e56d Mon Sep 17 00:00:00 2001 From: Tyler Porter Date: Tue, 27 Feb 2024 16:45:28 -0500 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ab275517..8e7e52dd 100755 --- a/README.md +++ b/README.md @@ -294,7 +294,7 @@ You can configure your LED matrix with the same flags used in the [rpi-rgb-led-m --led-pwm-dither-bits Time dithering of lower bits (Default: 0) --config Specify a configuration file name other, omitting json xtn (Default: config) --emulated Force the scoreboard to run in software emulation mode. ---drop-privileges Force the matrix driver to drop root privileges after setup. (Default: false) +--drop-privileges Force the matrix driver to drop root privileges after setup. (Default: true) ``` ## Personalization From 14d41d82380a03eb51827cecd1e3269f65aca2d1 Mon Sep 17 00:00:00 2001 From: Tyler Porter Date: Tue, 27 Feb 2024 16:45:42 -0500 Subject: [PATCH 3/3] Update utils.py --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 237b80f6..f4624f3a 100644 --- a/utils.py +++ b/utils.py @@ -127,7 +127,7 @@ def args(): const=True ) parser.add_argument( - "--drop-privileges", action="store_false", help="Force the matrix driver to drop root privileges after setup." + "--drop-privileges", action="store_true", help="Force the matrix driver to drop root privileges after setup." ) return parser.parse_args()