Skip to content
  • John Johansen's avatar
    parser: add support for autobind sockets · 0a52cf81
    John Johansen authored
    af_unix allows for sockets to be bound to a name that is autogenerated.
    Currently this type of binding is only supported by a very generic
    rule.
    
      unix (bind) type=dgram,
    
    but this allows both sockets with specified names and anonymous
    sockets. Extend unix rule syntax to support specifying just an
    auto bind socket by specifying addr=auto
    
    eg.
    
      unix (bind) addr=auto,
    
    It is important to note that addr=auto only works for the bind
    permission as once the socket is bound to an autogenerated address,
    the addr with have a valid unique value that can be matched against
    with a regular
    
      addr=@name
    
    expression
    
    Fixes: https://bugs.launchpad.net/apparmor/+bug/1867216
    MR: !521
    
    
    Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
    0a52cf81