Пример #1
0
static bool
gid_verify(gid_t real, gid_t effective, gid_t saved)
{
    gid_t r, e, s;

    return (getresgid(&r, &e, &s) == 0 &&
            gid_matches(real, r) &&
            gid_matches(effective, e) &&
            gid_matches(saved, s));
}
Пример #2
0
static bool
gid_verify(gid_t gid)
{
    gid_t r, e;

    r = getgid();
    e = getegid();
    return (gid_matches(gid, r) &&
            gid_matches(gid, e));
}