Skip to content
Snippets Groups Projects
  • William Roberts's avatar
    625a3526
    Replace unix_socket_connect() and explicit property sets with macro · 625a3526
    William Roberts authored
    
    A common source of mistakes when authoring sepolicy is properly
    setting up property sets. This is a 3 part step of:
    1. Allowing the unix domain connection to the init/property service
    2. Allowing write on the property_socket file
    3. Allowing the set on class property_service
    
    The macro unix_socket_connect() handled 1 and 2, but could be
    confusing for first time policy authors. 3 had to be explicitly
    added.
    
    To correct this, we introduce a new macros:
    set_prop(sourcedomain, targetprop)
    
    This macro handles steps 1, 2 and 3.
    
    No difference in sediff is expected.
    
    Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
    Signed-off-by: default avatarWilliam Roberts <william.c.roberts@linux.intel.com>
    625a3526
    History
    Replace unix_socket_connect() and explicit property sets with macro
    William Roberts authored
    
    A common source of mistakes when authoring sepolicy is properly
    setting up property sets. This is a 3 part step of:
    1. Allowing the unix domain connection to the init/property service
    2. Allowing write on the property_socket file
    3. Allowing the set on class property_service
    
    The macro unix_socket_connect() handled 1 and 2, but could be
    confusing for first time policy authors. 3 had to be explicitly
    added.
    
    To correct this, we introduce a new macros:
    set_prop(sourcedomain, targetprop)
    
    This macro handles steps 1, 2 and 3.
    
    No difference in sediff is expected.
    
    Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
    Signed-off-by: default avatarWilliam Roberts <william.c.roberts@linux.intel.com>