Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: sandbox/linux/services/syscall_wrappers.cc

Issue 997463002: Add SetCapabilities for setting capabilities to an exact set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update BUILD.gn. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sandbox/linux/services/syscall_wrappers.h ('k') | sandbox/linux/system_headers/capability.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sandbox/linux/services/syscall_wrappers.h" 5 #include "sandbox/linux/services/syscall_wrappers.h"
6 6
7 #include <pthread.h> 7 #include <pthread.h>
8 #include <sched.h> 8 #include <sched.h>
9 #include <setjmp.h> 9 #include <setjmp.h>
10 #include <sys/resource.h> 10 #include <sys/resource.h>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return syscall(__NR_seccomp, operation, flags, args); 70 return syscall(__NR_seccomp, operation, flags, args);
71 } 71 }
72 72
73 int sys_prlimit64(pid_t pid, 73 int sys_prlimit64(pid_t pid,
74 int resource, 74 int resource,
75 const struct rlimit64* new_limit, 75 const struct rlimit64* new_limit,
76 struct rlimit64* old_limit) { 76 struct rlimit64* old_limit) {
77 return syscall(__NR_prlimit64, pid, resource, new_limit, old_limit); 77 return syscall(__NR_prlimit64, pid, resource, new_limit, old_limit);
78 } 78 }
79 79
80 int sys_capget(cap_hdr* hdrp, cap_data* datap) {
81 return syscall(__NR_capget, hdrp, datap);
82 }
83
84 int sys_capset(cap_hdr* hdrp, const cap_data* datap) {
85 return syscall(__NR_capset, hdrp, datap);
86 }
87
80 } // namespace sandbox 88 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/linux/services/syscall_wrappers.h ('k') | sandbox/linux/system_headers/capability.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698