From 5215e4c0db7530519981f1e505e6db82401802f2 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Fri, 25 Apr 2014 14:59:37 -0700 Subject: add prctl / PR_SET_NO_NEW_PRIVS Add java wrappers for prctl and PR_SET_NO_NEW_PRIVS. Change-Id: I649a755ea9354b0290b25292bc65901b1528c1d5 --- luni/src/main/java/android/system/Os.java | 1 + luni/src/main/java/android/system/OsConstants.java | 1 + 2 files changed, 2 insertions(+) (limited to 'luni/src/main/java/android') 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(); -- cgit v1.1