Home
last modified time | relevance | path

Searched refs:cap_d (Results 1 – 11 of 11) sorted by relevance

/external/libcap/libcap/
Dcap_proc.c30 int cap_set_proc(cap_t cap_d) in cap_set_proc() argument
34 if (!good_cap_t(cap_d)) { in cap_set_proc()
40 retval = capset(&cap_d->head, &cap_d->u[0].set); in cap_set_proc()
49 int capgetp(pid_t pid, cap_t cap_d) in capgetp() argument
53 if (!good_cap_t(cap_d)) { in capgetp()
60 cap_d->head.pid = pid; in capgetp()
61 error = capget(&cap_d->head, &cap_d->u[0].set); in capgetp()
62 cap_d->head.pid = 0; in capgetp()
90 int capsetp(pid_t pid, cap_t cap_d) in capsetp() argument
94 if (!good_cap_t(cap_d)) { in capsetp()
[all …]
Dcap_flag.c16 int cap_get_flag(cap_t cap_d, cap_value_t value, cap_flag_t set, in cap_get_flag() argument
24 if (raised && good_cap_t(cap_d) && value >= 0 && value < __CAP_BITS in cap_get_flag()
26 *raised = isset_cap(cap_d,value,set) ? CAP_SET:CAP_CLEAR; in cap_get_flag()
39 int cap_set_flag(cap_t cap_d, cap_flag_t set, in cap_set_flag() argument
48 if (good_cap_t(cap_d) && no_values > 0 && no_values <= __CAP_BITS in cap_set_flag()
59 cap_d->raise_cap(value,set); in cap_set_flag()
61 cap_d->lower_cap(value,set); in cap_set_flag()
80 int cap_clear(cap_t cap_d) in cap_clear() argument
82 if (good_cap_t(cap_d)) { in cap_clear()
84 memset(&(cap_d->u), 0, sizeof(cap_d->u)); in cap_clear()
[all …]
Dcap_file.c98 static int _fcaps_save(struct vfs_cap_data *rawvfscap, cap_t cap_d, in _fcaps_save() argument
104 if (!good_cap_t(cap_d)) { in _fcaps_save()
109 switch (cap_d->head.version) { in _fcaps_save()
142 eff_not_zero |= cap_d->u[i].flat[CAP_EFFECTIVE]; in _fcaps_save()
145 if ((cap_d->u[i].flat[CAP_EFFECTIVE] in _fcaps_save()
146 || cap_d->u[i].flat[CAP_INHERITABLE] in _fcaps_save()
147 || cap_d->u[i].flat[CAP_PERMITTED])) { in _fcaps_save()
159 = FIXUP_32BITS(cap_d->u[i].flat[CAP_PERMITTED]); in _fcaps_save()
161 = FIXUP_32BITS(cap_d->u[i].flat[CAP_INHERITABLE]); in _fcaps_save()
164 && ((~(cap_d->u[i].flat[CAP_EFFECTIVE])) in _fcaps_save()
[all …]
Dcap_extint.c43 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()
Dcap_alloc.c88 cap_t cap_dup(cap_t cap_d) in cap_dup() argument
92 if (!good_cap_t(cap_d)) { in cap_dup()
104 memcpy(result, cap_d, sizeof(*cap_d)); in cap_dup()
Dlibcap.h190 extern int capgetp(pid_t pid, cap_t cap_d);
191 extern int capsetp(pid_t pid, cap_t cap_d);
/external/libcap/progs/
Dsetcap.c79 cap_t cap_d; in main() local
91 cap_d = NULL; in main()
102 cap_d = cap_from_text(text); in main()
103 if (cap_d == NULL) { in main()
112 result = cap_to_text(cap_d, &length); in main()
127 if (cap_d == NULL) { in main()
128 cap_d = cap_from_text("="); in main()
137 cmp = cap_compare(cap_on_file, cap_d); in main()
171 retval = cap_set_file(*++argv, cap_d); in main()
180 cap_get_flag(cap_d, cap, CAP_PERMITTED, &per_state) != -1; in main()
[all …]
Dgetcap.c37 cap_t cap_d; in do_getcap() local
47 cap_d = cap_get_file(fname); in do_getcap()
48 if (cap_d == NULL) { in do_getcap()
58 result = cap_to_text(cap_d, NULL); in do_getcap()
63 cap_free(cap_d); in do_getcap()
67 cap_free(cap_d); in do_getcap()
Dgetpcaps.c36 cap_t cap_d; in main() local
40 cap_d = cap_get_pid(pid); in main()
41 if (cap_d == NULL) { in main()
47 char *result = cap_to_text(cap_d, &length); in main()
51 cap_free(cap_d); in main()
/external/libcap/progs/old/
Dsetpcaps.c68 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/
Dcapability.h117 extern int capgetp(pid_t pid, cap_t cap_d);
120 extern int capsetp(pid_t pid, cap_t cap_d);