github.com/apptainer/singularity@v3.1.1+incompatible/cmd/starter/c/capability.c (about)

     1  /*
     2   * Copyright (c) 2017-2019, SyLabs, Inc. All rights reserved.
     3   * Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
     4   *
     5   * This software is licensed under a 3-clause BSD license.  Please
     6   * consult LICENSE.md file distributed with the sources of this project regarding
     7   * your rights to use or distribute this software.
     8   *
     9   */
    10  
    11  
    12  #define _GNU_SOURCE
    13  #include <unistd.h>
    14  #include <sys/syscall.h>
    15  
    16  #include "include/capability.h"
    17  
    18  int capget(cap_user_header_t hdrp, cap_user_data_t datap) {
    19      return syscall(__NR_capget, hdrp, datap);
    20  }
    21  
    22  int capset(cap_user_header_t hdrp, const cap_user_data_t datap) {
    23      return syscall(__NR_capset, hdrp, datap);
    24  }