/external/libcap/libcap/ |
D | cap_file.c | 120 static int _fcaps_save(struct vfs_ns_cap_data *rawvfscap, cap_t cap_d, in _fcaps_save() argument 126 if (!good_cap_t(cap_d)) { in _fcaps_save() 131 switch (cap_d->head.version) { in _fcaps_save() 150 if (cap_d->rootid != 0) { in _fcaps_save() 151 if (cap_d->head.version < _LINUX_CAPABILITY_VERSION_3) { in _fcaps_save() 159 rawvfscap->rootid = FIXUP_32BITS(cap_d->rootid); in _fcaps_save() 165 eff_not_zero |= cap_d->u[i].flat[CAP_EFFECTIVE]; in _fcaps_save() 168 if ((cap_d->u[i].flat[CAP_EFFECTIVE] in _fcaps_save() 169 || cap_d->u[i].flat[CAP_INHERITABLE] in _fcaps_save() 170 || cap_d->u[i].flat[CAP_PERMITTED])) { in _fcaps_save() [all …]
|
D | cap_flag.c | 18 int cap_get_flag(cap_t cap_d, cap_value_t value, cap_flag_t set, in cap_get_flag() argument 26 if (raised && good_cap_t(cap_d) && value >= 0 && value < __CAP_MAXBITS in cap_get_flag() 28 *raised = isset_cap(cap_d,value,set) ? CAP_SET:CAP_CLEAR; in cap_get_flag() 41 int cap_set_flag(cap_t cap_d, cap_flag_t set, in cap_set_flag() argument 50 if (good_cap_t(cap_d) && no_values > 0 && no_values < __CAP_MAXBITS in cap_set_flag() 61 cap_d->raise_cap(value,set); in cap_set_flag() 63 cap_d->lower_cap(value,set); in cap_set_flag() 82 int cap_clear(cap_t cap_d) in cap_clear() argument 84 if (good_cap_t(cap_d)) { in cap_clear() 85 memset(&(cap_d->u), 0, sizeof(cap_d->u)); in cap_clear() [all …]
|
D | cap_extint.c | 43 ssize_t cap_copy_ext(void *cap_ext, cap_t cap_d, ssize_t length) in cap_copy_ext() argument 49 if (!good_cap_t(cap_d) || length < ssizeof(struct cap_ext_struct) in cap_copy_ext() 64 val = cap_d->u[j/sizeof(__u32)].flat[i]; in cap_copy_ext() 86 cap_t cap_d; in cap_copy_int() local 97 if (!(cap_d = cap_init())) in cap_copy_int() 116 cap_d->u[blk].flat[set] = val; in cap_copy_int() 121 return cap_d; in cap_copy_int()
|
D | cap_proc.c | 177 static int _cap_set_proc(struct syscaller_s *sc, cap_t cap_d) { in _cap_set_proc() argument 180 if (!good_cap_t(cap_d)) { in _cap_set_proc() 186 retval = _libcap_capset(sc, &cap_d->head, &cap_d->u[0].set); in _cap_set_proc() 191 int cap_set_proc(cap_t cap_d) in cap_set_proc() argument 193 return _cap_set_proc(&multithread, cap_d); in cap_set_proc() 200 int capgetp(pid_t pid, cap_t cap_d) in capgetp() argument 204 if (!good_cap_t(cap_d)) { in capgetp() 211 cap_d->head.pid = pid; in capgetp() 212 error = capget(&cap_d->head, &cap_d->u[0].set); in capgetp() 213 cap_d->head.pid = 0; in capgetp() [all …]
|
D | cap_alloc.c | 103 cap_t cap_dup(cap_t cap_d) in cap_dup() argument 107 if (!good_cap_t(cap_d)) { in cap_dup() 119 memcpy(result, cap_d, sizeof(*cap_d)); in cap_dup()
|
D | libcap.h | 198 extern int capgetp(pid_t pid, cap_t cap_d); 199 extern int capsetp(pid_t pid, cap_t cap_d);
|
/external/libcap/progs/ |
D | setcap.c | 89 cap_t cap_d; in main() local 124 cap_d = NULL; in main() 135 cap_d = cap_from_text(text); in main() 136 if (cap_d == NULL) { in main() 140 if (cap_set_nsowner(cap_d, rootid)) { in main() 149 result = cap_to_text(cap_d, &length); in main() 164 if (cap_d == NULL) { in main() 165 cap_d = cap_from_text("="); in main() 174 cmp = cap_compare(cap_on_file, cap_d); in main() 212 retval = cap_set_file(*++argv, cap_d); in main() [all …]
|
D | getcap.c | 39 cap_t cap_d; in do_getcap() local 50 cap_d = cap_get_file(fname); in do_getcap() 51 if (cap_d == NULL) { in do_getcap() 61 result = cap_to_text(cap_d, NULL); in do_getcap() 66 cap_free(cap_d); in do_getcap() 69 rootid = cap_get_nsowner(cap_d); in do_getcap() 75 cap_free(cap_d); in do_getcap()
|
D | getpcaps.c | 41 cap_t cap_d; in main() local 61 cap_d = cap_get_pid(pid); in main() 62 if (cap_d == NULL) { in main() 68 char *result = cap_to_text(cap_d, &length); in main() 78 cap_free(cap_d); in main()
|
/external/libcap/progs/old/ |
D | setpcaps.c | 68 cap_t cap_d; in main() local 90 cap_d = cap_from_text(text); in main() 91 if (cap_d == NULL) { in main() 100 result = cap_to_text(cap_d, &length); in main() 111 retval = capsetp(pid, cap_d); in main()
|
/external/libcap/libcap/include/sys/ |
D | capability.h | 207 extern int capgetp(pid_t pid, cap_t cap_d); 210 extern int capsetp(pid_t pid, cap_t cap_d);
|