Home
last modified time | relevance | path

Searched refs:uid (Results 1 – 15 of 15) sorted by relevance

/libcore/luni/src/main/java/android/system/
DStructUcred.java31 public final int uid; field in StructUcred
36 public StructUcred(int pid, int uid, int gid) { in StructUcred() argument
38 this.uid = uid; in StructUcred()
DOs.java126 …public static void chown(String path, int uid, int gid) throws ErrnoException { Libcore.os.chown(p… in chown() argument
176 …ic static void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException { Libcore.os.fcho… in fchown() argument
279 …public static StructPasswd getpwuid(int uid) throws ErrnoException { return Libcore.os.getpwuid(ui… in getpwuid() argument
426 …public static void lchown(String path, int uid, int gid) throws ErrnoException { Libcore.os.lchown… in lchown() argument
833 public static void setuid(int uid) throws ErrnoException { Libcore.os.setuid(uid); } in setuid() argument
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixUserPrincipals.java58 int uid() { in uid() method in UnixUserPrincipals.User
115 static User fromUid(int uid) { in fromUid() argument
118 name = Util.toString(getpwuid(uid)); in fromUid()
120 name = Integer.toString(uid); in fromUid()
122 return new User(uid, name); in fromUid()
170 int uid = lookupName(name, false); in lookupUser() local
171 return new User(uid, name); in lookupUser()
DUnixFileAttributeViews.java243 final void setOwners(int uid, int gid) throws IOException { in setOwners() argument
247 chown(file, uid, gid); in setOwners()
249 lchown(file, uid, gid); in setOwners()
273 int uid = ((UnixUserPrincipals.User)owner).uid(); in setOwner() local
274 setOwners(uid, -1); in setOwner()
358 builder.add(UID_NAME, attrs.uid()); in readAttributes()
DUnixNativeDispatcher.java332 static void chown(UnixPath path, int uid, int gid) throws UnixException { in chown() argument
335 chown0(buffer.address(), uid, gid); in chown() local
340 private static native void chown0(long pathAddress, int uid, int gid) in chown0() argument
346 static void lchown(UnixPath path, int uid, int gid) throws UnixException { in lchown() argument
349 lchown0(buffer.address(), uid, gid); in lchown() local
354 private static native void lchown0(long pathAddress, int uid, int gid) in lchown0() argument
360 static native void fchown(int fd, int uid, int gid) throws UnixException; in fchown() argument
461 static native byte[] getpwuid(int uid) throws UnixException; in getpwuid() argument
DUnixCopyFile.java163 fchown(dfd, attrs.uid(), attrs.gid()); in copyDirectory()
166 chown(target, attrs.uid(), attrs.gid()); in copyDirectory()
258 fchown(fo, attrs.uid(), attrs.gid()); in copyFile()
320 lchown(target, attrs.uid(), attrs.gid()); in copyLink()
346 chown(target, attrs.uid(), attrs.gid()); in copySpecial()
DUnixSecureDirectoryStream.java523 private void setOwners(int uid, int gid) throws IOException { in setOwners() argument
534 fchown(fd, uid, gid); in setOwners()
559 int uid = ((UnixUserPrincipals.User)owner).uid(); in setOwner() local
560 setOwners(uid, -1); in setOwner()
DUnixFileAttributes.java105 int uid() { return st_uid; } in uid() method in UnixFileAttributes
/libcore/luni/src/main/java/libcore/io/
DForwardingOs.java174 …public void chown(String path, int uid, int gid) throws ErrnoException { os.chown(path, uid, gid);… in chown() argument
244 …public void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException { os.fchown(fd, uid,… in fchown() argument
340 public StructPasswd getpwuid(int uid) throws ErrnoException { return os.getpwuid(uid); } in getpwuid() argument
451 …public void lchown(String path, int uid, int gid) throws ErrnoException { os.lchown(path, uid, gid… in lchown() argument
811 public void setuid(int uid) throws ErrnoException { os.setuid(uid); } in setuid() argument
DOs.java109 public void chown(String path, int uid, int gid) throws ErrnoException; in chown() argument
182 public void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException; in fchown() argument
279 public StructPasswd getpwuid(int uid) throws ErrnoException; in getpwuid() argument
389 public void lchown(String path, int uid, int gid) throws ErrnoException; in lchown() argument
672 public void setuid(int uid) throws ErrnoException; in setuid() argument
DBlockGuardOs.java87 @Override public void chown(String path, int uid, int gid) throws ErrnoException { in chown() argument
90 super.chown(path, uid, gid); in chown()
178 @Override public void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException { in fchown() argument
180 super.fchown(fd, uid, gid); in fchown()
225 @Override public void lchown(String path, int uid, int gid) throws ErrnoException { in lchown() argument
228 super.lchown(path, uid, gid); in lchown()
DLinux.java62 public native void chown(String path, int uid, int gid) throws ErrnoException; in chown() argument
78 public native void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException; in fchown() argument
97 public native StructPasswd getpwuid(int uid) throws ErrnoException; in getpwuid() argument
119 public native void lchown(String path, int uid, int gid) throws ErrnoException; in lchown() argument
257 public native void setuid(int uid) throws ErrnoException; in setuid() argument
/libcore/ojluni/src/main/native/
DUnixNativeDispatcher.c582 jlong pathAddress, jint uid, jint gid) in Java_sun_nio_fs_UnixNativeDispatcher_chown0() argument
587 RESTARTABLE(chown(path, (uid_t)uid, (gid_t)gid), err); in Java_sun_nio_fs_UnixNativeDispatcher_chown0()
594 Java_sun_nio_fs_UnixNativeDispatcher_lchown0(JNIEnv* env, jclass this, jlong pathAddress, jint uid,… in Java_sun_nio_fs_UnixNativeDispatcher_lchown0() argument
599 RESTARTABLE(lchown(path, (uid_t)uid, (gid_t)gid), err); in Java_sun_nio_fs_UnixNativeDispatcher_lchown0()
606 Java_sun_nio_fs_UnixNativeDispatcher_fchown(JNIEnv* env, jclass this, jint filedes, jint uid, jint … in Java_sun_nio_fs_UnixNativeDispatcher_fchown() argument
610 RESTARTABLE(fchown(filedes, (uid_t)uid, (gid_t)gid), err); in Java_sun_nio_fs_UnixNativeDispatcher_fchown()
1012 Java_sun_nio_fs_UnixNativeDispatcher_getpwuid(JNIEnv* env, jclass this, jint uid) in Java_sun_nio_fs_UnixNativeDispatcher_getpwuid() argument
1032 RESTARTABLE_RETURN_PTR(getpwuid_r((uid_t)uid, &pwent, pwbuf, (size_t)buflen), p); in Java_sun_nio_fs_UnixNativeDispatcher_getpwuid()
1034 RESTARTABLE(getpwuid_r((uid_t)uid, &pwent, pwbuf, (size_t)buflen, &p), res); in Java_sun_nio_fs_UnixNativeDispatcher_getpwuid()
1117 jint uid = -1; in Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0() local
[all …]
/libcore/luni/src/main/native/
Dlibcore_io_Linux.cpp550 return env->NewObject(JniConstants::GetStructUcredClass(env), ctor, u.pid, u.uid, u.gid); in makeStructUcred()
846 jobject getpwuid(uid_t uid) { in getpwuid() argument
847 return process("getpwuid_r", getpwuid_r(uid, &mPwd, mBuffer.get(), mBufferSize, &mResult)); in getpwuid()
1157 static void Linux_chown(JNIEnv* env, jobject, jstring javaPath, jint uid, jint gid) { in Linux_chown() argument
1162 throwIfMinusOne(env, "chown", TEMP_FAILURE_RETRY(chown(path.c_str(), uid, gid))); in Linux_chown()
1304 static void Linux_fchown(JNIEnv* env, jobject, jobject javaFd, jint uid, jint gid) { in Linux_fchown() argument
1306 throwIfMinusOne(env, "fchown", TEMP_FAILURE_RETRY(fchown(fd, uid, gid))); in Linux_fchown()
1488 static jobject Linux_getpwuid(JNIEnv* env, jobject, jint uid) { in Linux_getpwuid() argument
1489 return Passwd(env).getpwuid(uid); in Linux_getpwuid()
1831 static void Linux_lchown(JNIEnv* env, jobject, jstring javaPath, jint uid, jint gid) { in Linux_lchown() argument
[all …]
/libcore/luni/src/test/java/libcore/android/system/
DOsTest.java194 assertEquals(Os.getuid(), credentials.uid); in checkUnixDomainSocket()