diff --git a/bindings/python/rgbmatrix/core.pxd b/bindings/python/rgbmatrix/core.pxd index a2e3189ec..499e99306 100644 --- a/bindings/python/rgbmatrix/core.pxd +++ b/bindings/python/rgbmatrix/core.pxd @@ -19,6 +19,8 @@ cdef class RGBMatrixOptions: cdef bytes __py_encoded_led_rgb_sequence cdef bytes __py_encoded_pixel_mapper_config cdef bytes __py_encoded_panel_type + cdef bytes __py_encoded_drop_priv_user + cdef bytes __py_encoded_drop_priv_group # Local Variables: # mode: python diff --git a/bindings/python/rgbmatrix/core.pyx b/bindings/python/rgbmatrix/core.pyx index 4d6aee873..df7b99bd3 100644 --- a/bindings/python/rgbmatrix/core.pyx +++ b/bindings/python/rgbmatrix/core.pyx @@ -192,6 +192,18 @@ cdef class RGBMatrixOptions: def __get__(self): return self.__runtime_options.drop_privileges def __set__(self, uint8_t value): self.__runtime_options.drop_privileges = value + property drop_priv_user: + def __get__(self): return self.__runtime_options.drop_priv_user + def __set__(self, value): + self.__py_encoded_drop_priv_user = value.encode('utf-8') + self.__runtime_options.drop_priv_user = self.__py_encoded_drop_priv_user + + property drop_priv_group: + def __get__(self): return self.__runtime_options.drop_priv_group + def __set__(self, value): + self.__py_encoded_drop_priv_group = value.encode('utf-8') + self.__runtime_options.drop_priv_group = self.__py_encoded_drop_priv_group + cdef class RGBMatrix(Canvas): def __cinit__(self, int rows = 0, int chains = 0, int parallel = 0, RGBMatrixOptions options = None): diff --git a/bindings/python/rgbmatrix/cppinc.pxd b/bindings/python/rgbmatrix/cppinc.pxd index c8b1d28bf..21aeff186 100644 --- a/bindings/python/rgbmatrix/cppinc.pxd +++ b/bindings/python/rgbmatrix/cppinc.pxd @@ -35,6 +35,8 @@ cdef extern from "led-matrix.h" namespace "rgb_matrix": int gpio_slowdown int daemon int drop_privileges + const char *drop_priv_user + const char *drop_priv_group RGBMatrix *CreateMatrixFromOptions(Options &options, RuntimeOptions runtime_options)