Searched refs:uid (Results 1 - 25 of 46) sorted by relevance

12

/system/core/libcutils/
H A Dmultiuser.c19 userid_t multiuser_get_user_id(uid_t uid) { argument
20 return uid / MULTIUSER_APP_PER_USER_RANGE;
23 appid_t multiuser_get_app_id(uid_t uid) { argument
24 return uid % MULTIUSER_APP_PER_USER_RANGE;
H A Dsockets.c37 if ((cr.uid != AID_ROOT) && (cr.uid != AID_SHELL)) {
38 ALOGE("untrusted userid on other end of socket: userid %d\n", cr.uid);
H A Dqtaguid.c99 int qtaguid_tagSocket(int sockfd, int tag, uid_t uid) { argument
106 snprintf(lineBuf, sizeof(lineBuf), "t %d %llu %d", sockfd, kTag, uid);
108 ALOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid);
112 ALOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d",
113 sockfd, kTag, tag, uid, res);
134 int qtaguid_setCounterSet(int counterSetNum, uid_t uid) { argument
138 ALOGV("Setting counters to set %d for uid %d", counterSetNum, uid);
140 snprintf(lineBuf, sizeof(lineBuf), "s %d %d", counterSetNum, uid);
145 qtaguid_deleteTagData(int tag, uid_t uid) argument
[all...]
H A Dfs.c33 int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid) { argument
50 if (((sb.st_mode & ALL_PERMS) == mode) && (sb.st_uid == uid) && (sb.st_gid == gid)) {
69 if (TEMP_FAILURE_RETRY(chown(path, uid, gid)) == -1) {
70 ALOGE("Failed to chown(%s, %d, %d): %s", path, uid, gid, strerror(errno));
/system/core/include/cutils/
H A Dqtaguid.h31 extern int qtaguid_tagSocket(int sockfd, int tag, uid_t uid);
39 * For the given uid, switch counter sets.
43 extern int qtaguid_setCounterSet(int counterSetNum, uid_t uid);
46 * Delete all tag info that relates to the given tag an uid.
47 * If the tag is 0, then ALL info about the uid is freeded.
54 extern int qtaguid_deleteTagData(int tag, uid_t uid);
H A Dmultiuser.h33 extern userid_t multiuser_get_user_id(uid_t uid);
34 extern appid_t multiuser_get_app_id(uid_t uid);
H A Duevent.h29 ssize_t uevent_kernel_multicast_uid_recv(int socket, void *buffer, size_t length, uid_t *uid);
H A Dfs.h44 extern int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid);
/system/core/run-as/
H A Dpackage.h30 uid_t uid; member in struct:__anon472
39 extern int check_data_path(const char* dataDir, uid_t uid);
H A Drun-as.c38 * This program runs as set-uid root on Android production devices.
45 * until the uid/gid has been dropped to that of a normal user
105 int myuid, uid, gid; local
126 if (info.uid < AID_APP) {
138 if (check_data_path(info.dataDir, info.uid) < 0) {
159 uid = gid = info.uid;
160 if(setresgid(gid,gid,gid) || setresuid(uid,uid,uid)) {
[all...]
H A Dpackage.c29 * the run-as command has dropped the uid/gid. Hence be very
139 * - is owned by a given uid/gid
147 check_directory_ownership(const char* path, uid_t uid) argument
163 /* must be owned by specific uid/gid */
164 if (st.st_uid != uid || st.st_gid != uid)
187 check_data_path(const char* dataPath, uid_t uid) argument
238 * directory is owned by the application uid
240 if (check_directory_ownership(dataPath, uid) < 0)
411 info->uid
440 int uid, debugFlag; local
[all...]
/system/core/init/
H A Ddevices.h25 mode_t perm, unsigned int uid,
H A Dproperty_service.c63 unsigned int uid; member in struct:__anon372
106 unsigned int uid; member in struct:__anon373
259 * Returns 1 if uid allowed, 0 otherwise.
261 static int check_control_perms(const char *name, unsigned int uid, unsigned int gid, char *sctx) { argument
264 if (uid == AID_SYSTEM || uid == AID_ROOT)
270 if ((uid && control_perms[i].uid == uid) ||
281 * Returns 1 if uid allowe
283 check_perms(const char *name, unsigned int uid, unsigned int gid, char *sctx) argument
[all...]
H A Dueventd.c116 uid_t uid; local
166 ERROR("invalid uid '%s'\n", args[2]);
170 uid = ret;
180 add_dev_perms(name, attr, perm, uid, gid, prefix);
H A Dutil.h29 uid_t uid, gid_t gid);
H A Dinit.h55 uid_t uid; member in struct:socketinfo
93 uid_t uid; member in struct:service
/system/core/libsysutils/src/
H A DNetlinkListener.cpp48 uid_t uid = -1; local
51 socket, mBuffer, sizeof(mBuffer), &uid));
53 if (uid > 0)
54 LOG_EVENT_INT(65537, uid);
/system/extras/su/
H A Dsu.c45 int uid, gid, myuid; local
50 fprintf(stderr,"su: uid %d not allowed to su\n", myuid);
55 uid = gid = 0;
60 uid = gid = atoi(argv[1]);
62 uid = pw->pw_uid;
67 if(setgid(gid) || setuid(uid)) {
/system/extras/ext4_utils/
H A Dcontents.h28 u16 uid; member in struct:dentry
39 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime);
H A Dmake_ext4fs.h34 typedef void (*fs_config_func_t)(const char *path, int dir, unsigned *uid, unsigned *gid,
/system/core/toolbox/
H A Dchown.c33 // Lookup uid (and gid if specified)
36 uid_t uid; local
41 uid = pw->pw_uid;
44 uid = (int) strtoul(user, &endptr, 0);
66 if (chown(argv[i], uid, gid) < 0) {
H A Did.c12 static void print_uid(uid_t uid) argument
14 struct passwd *pw = getpwuid(uid);
17 printf("%d(%s)", uid, pw->pw_name);
19 printf("%d",uid);
44 printf("uid=");
/system/security/keystore/
H A Dkeystore.cpp180 static int encode_key_for_uid(char* out, uid_t uid, const Value* key) { argument
181 int n = snprintf(out, NAME_MAX, "%u_", uid);
441 uint32_t uid; member in struct:__anon570
616 uid_t uid; local
617 if (!convertToUid(uidValue, &uid)) {
621 grant_t *grant = getGrant(filename, uid);
624 grant->uid = uid;
631 uid_t uid; local
632 if (!convertToUid(uidValue, &uid)) {
895 get_key_for_name(KeyStore* keyStore, Blob* keyBlob, const Value* keyName, const uid_t uid, const BlobType type) argument
939 get(KeyStore* keyStore, int sock, uid_t uid, Value* keyName, Value*, Value*) argument
952 insert(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value* val, Value*) argument
960 del(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value*, Value*) argument
971 exist(KeyStore*, int, uid_t uid, Value* keyName, Value*, Value*) argument
980 saw(KeyStore*, int sock, uid_t uid, Value* keyPrefix, Value*, Value*) argument
1052 unlock(KeyStore* keyStore, int sock, uid_t uid, Value* pw, Value* unused, Value* unused2) argument
1061 generate(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value*, Value*) argument
1094 import(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value* key, Value*) argument
1114 get_pubkey(KeyStore* keyStore, int sock, uid_t uid, Value* keyName, Value*, Value*) argument
1149 del_key(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value*, Value*) argument
1180 sign(KeyStore* keyStore, int sock, uid_t uid, Value* keyName, Value* data, Value*) argument
1221 verify(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value* data, Value* signature) argument
1253 grant(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value* granteeData, Value*) argument
1265 ungrant(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value* granteeData, Value*) argument
1276 getmtime(KeyStore*, int sock, uid_t uid, Value* keyName, Value*, Value*) argument
1363 uid_t uid; member in struct:user
1375 process(KeyStore* keyStore, int sock, uid_t uid, int8_t code) argument
[all...]
/system/extras/tests/fstest/
H A Dperm_checker.c78 printf("# ERROR # Invalid uid '%s' reading line %d\n", str, line_num);
200 static void print_new_rule(const char *name, mode_t mode, uid_t uid, gid_t gid) argument
205 pw = getpwuid(uid);
206 printf("%s %4o %4o %s %d %s %d\n", name, mode, mode, pw->pw_name, uid,
211 static int pass_rule(const perm_rule_t *pr, mode_t mode, uid_t uid, gid_t gid) argument
216 (pr->min_uid <= uid) && (pr->max_uid >= uid))
223 static int validate_file(const char *name, mode_t mode, uid_t uid, gid_t gid) argument
232 if (!pass_rule(pr, mode, uid, gid))
245 print_new_rule(name, mode, uid, gi
284 validate_link(const char *name, mode_t mode, uid_t uid, gid_t gid) argument
312 validate_dir(const char *name, mode_t mode, uid_t uid, gid_t gid) argument
[all...]
/system/core/include/private/
H A Dandroid_filesystem_config.h89 #define AID_USER 100000 /* offset for uid ranges for each user */
149 unsigned uid; member in struct:fs_path_config
203 /* the following two files are INTENTIONALLY set-gid and not set-uid.
207 /* the following five files are INTENTIONALLY set-uid, but they
215 /* the following file is INTENTIONALLY set-uid, and IS included
232 unsigned *uid, unsigned *gid, unsigned *mode)
253 *uid = pc->uid;
259 path, pc->prefix ? pc->prefix : "", *uid, *gid, *mode);
231 fs_config(const char *path, int dir, unsigned *uid, unsigned *gid, unsigned *mode) argument

Completed in 830 milliseconds

12