Skip to content
  • Tyler Hicks's avatar
    tests: Break up unix_socket getopt and setopt operations · 2b22c70e
    Tyler Hicks authored
    
    
    The unix_socket operations for testing getopt and setopt permissions
    were occurring back to back. This patch breaks them up into "pre-bind"
    and "post-bind" operations. The setopt operation now occurs pre-bind
    while the getopt operation happens post-bind. This allows for the test
    policy to test setopt without an addr= conditional and to test getopt
    with an addr= conditional.
    
    Additionally, the wrapper functions that call setsockopt()/getsockopt()
    are moved into a new file that both unix_socket.c and
    unix_socket_client.c can reuse.
    
    Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
    Acked-by: default avatarSteve Beattie <steve@nxnw.org>
    2b22c70e