openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libcap/2.27-r0/libcap-2.27/libcap/cap_proc.c
int capsetp(pid_t pid, cap_t cap_d)
{
    int error;

    if (!good_cap_t(cap_d))
    {
        errno = EINVAL;
        return -1;
    }

    _cap_debug("setting process capabilities for proc %d", pid);
    cap_d->head.pid = pid;
    error = capset(&cap_d->head, &cap_d->u[0].set);
    cap_d->head.version = _LIBCAP_CAPABILITY_VERSION;
    cap_d->head.pid = 0;

    return error;
}
/* set the caps on a specific process/pg etc.. */
set the caps on a specific process/pg etc
set the caps on a specific process / pg etc
int capsetp(pid_t pid, cap_t cap_d)
{
    int error;
    if (!good_cap_t(cap_d))
    {
        errno = EINVAL;
        return -1;
    }
    _cap_debug("setting process capabilities for proc %d", pid);
    cap_d->head.pid = pid;
    error = capset(&cap_d->head, &cap_d->u[0].set);
    cap_d->head.version = _LIBCAP_CAPABILITY_VERSION;
    cap_d->head.pid = 0;
    return error;
}
int capsetp ( pid_t pid , cap_t cap_d ) { int error ; if ( ! good_cap_t ( cap_d ) ) { errno = EINVAL ; return -1 ; } _cap_debug ( " " , pid ) ; cap_d -> head . pid = pid ; error = capset ( & cap_d -> head , & cap_d -> u [ 0 ] . set ) ; cap_d -> head . version = _LIBCAP_CAPABILITY_VERSION ; cap_d -> head . pid = 0 ; return error ; }
set the caps on a specific process/pg etc..
set the caps on a specific process / pg etc ..