summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java/android
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2014-04-25 14:59:37 -0700
committerNick Kralevich <nnk@google.com>2014-04-29 11:23:24 -0700
commit5215e4c0db7530519981f1e505e6db82401802f2 (patch)
treee49d0c3fa8c29d0f4313a5ecdf598eb56a434032 /luni/src/main/java/android
parentf3305fa5d4f282e705fd7ba30b07caa3c0f9da71 (diff)
downloadlibcore-5215e4c0db7530519981f1e505e6db82401802f2.zip
libcore-5215e4c0db7530519981f1e505e6db82401802f2.tar.gz
libcore-5215e4c0db7530519981f1e505e6db82401802f2.tar.bz2
add prctl / PR_SET_NO_NEW_PRIVS
Add java wrappers for prctl and PR_SET_NO_NEW_PRIVS. Change-Id: I649a755ea9354b0290b25292bc65901b1528c1d5
Diffstat (limited to 'luni/src/main/java/android')
-rw-r--r--luni/src/main/java/android/system/Os.java1
-rw-r--r--luni/src/main/java/android/system/OsConstants.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/luni/src/main/java/android/system/Os.java b/luni/src/main/java/android/system/Os.java
index 0ca22a9..d280ea8 100644
--- a/luni/src/main/java/android/system/Os.java
+++ b/luni/src/main/java/android/system/Os.java
@@ -112,6 +112,7 @@ public final class Os {
public static FileDescriptor[] pipe() throws ErrnoException { return Libcore.os.pipe(); }
public static int poll(StructPollfd[] fds, int timeoutMs) throws ErrnoException { return Libcore.os.poll(fds, timeoutMs); }
public static void posix_fallocate(FileDescriptor fd, long offset, long length) throws ErrnoException { Libcore.os.posix_fallocate(fd, offset, length); }
+ public static int prctl(int option, long arg2, long arg3, long arg4, long arg5) throws ErrnoException { return Libcore.os.prctl(option, arg2, arg3, arg4, arg5); };
public static int pread(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException { return Libcore.os.pread(fd, buffer, offset); }
public static int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return Libcore.os.pread(fd, bytes, byteOffset, byteCount, offset); }
public static int pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException { return Libcore.os.pwrite(fd, buffer, offset); }
diff --git a/luni/src/main/java/android/system/OsConstants.java b/luni/src/main/java/android/system/OsConstants.java
index d751a18..3bf70f6 100644
--- a/luni/src/main/java/android/system/OsConstants.java
+++ b/luni/src/main/java/android/system/OsConstants.java
@@ -296,6 +296,7 @@ public final class OsConstants {
public static final int POLLRDNORM = placeholder();
public static final int POLLWRBAND = placeholder();
public static final int POLLWRNORM = placeholder();
+ public static final int PR_SET_NO_NEW_PRIVS = placeholder();
public static final int PROT_EXEC = placeholder();
public static final int PROT_NONE = placeholder();
public static final int PROT_READ = placeholder();