github.com/kubiko/snapd@v0.0.0-20201013125620-d4f3094d9ddf/cmd/snap-confine/seccomp-support-ext.h (about)

     1  /*
     2   * Copyright (C) 2019 Canonical Ltd
     3   *
     4   * This program is free software: you can redistribute it and/or modify
     5   * it under the terms of the GNU General Public License version 3 as
     6   * published by the Free Software Foundation.
     7   *
     8   * This program is distributed in the hope that it will be useful,
     9   * but WITHOUT ANY WARRANTY; without even the implied warranty of
    10   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    11   * GNU General Public License for more details.
    12   *
    13   * You should have received a copy of the GNU General Public License
    14   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    15   *
    16   */
    17  #ifndef SNAP_CONFINE_SECCOMP_SUPPORT_EXT_H
    18  #define SNAP_CONFINE_SECCOMP_SUPPORT_EXT_H
    19  
    20  #include <linux/filter.h>
    21  #include <stddef.h>
    22  
    23  size_t sc_read_seccomp_filter(const char *filename, char *buf, size_t buf_size);
    24  
    25  /**
    26   * Apply a given bpf program as a seccomp system call filter.
    27   **/
    28  void sc_apply_seccomp_filter(struct sock_fprog *prog);
    29  
    30  #endif