Lines Matching refs:uid
26 ** uid -- user id to compare against.
31 ** SFF_MUSTOWN -- "uid" must own this file.
38 ** 0 if fn exists, is owned by uid, and matches mode.
46 safefile(fn, uid, gid, user, flags, mode, st)
48 UID_T uid;
64 sm_dprintf("safefile(%s, uid=%d, gid=%d, flags=%lx, mode=%o):\n",
65 fn, (int) uid, (int) gid, flags, mode);
108 uid = st->st_uid;
120 (uid == 0 && !bitset(SFF_ROOTOK|SFF_OPENASROOT, flags));
129 ret = safedirpath(".", uid, gid, user,
135 ret = safedirpath(fn, uid, gid, user,
168 ret = safedirpath(".", uid, gid, user, flags, 0, 0);
173 ret = safedirpath(fn, uid, gid, user, flags, 0, 0);
210 if (stbuf.st_uid == uid)
213 else if (uid == 0 && stbuf.st_uid == TrustedUid)
246 sm_dprintf("\t[final dir %s uid %d mode %lo] %s\n",
319 if (uid == 0 && bitset(SFF_OPENASROOT, flags))
322 else if (uid == 0 && !bitset(SFF_ROOTOK, flags))
324 else if (st->st_uid == uid)
327 else if (uid == 0 && st->st_uid == TrustedUid)
354 sm_dprintf("\t[uid %d, nlink %d, stat %lo, mode %lo] ",
357 if ((st->st_uid == uid || st->st_uid == 0 ||
377 ** uid -- user id to compare against.
394 safedirpath(fn, uid, gid, user, flags, level, offset)
396 UID_T uid;
424 sm_dprintf("safedirpath(%s, uid=%ld, gid=%ld, flags=%lx, level=%d, offset=%d):\n",
425 fn, (long) uid, (long) gid, flags, level, offset);
579 ret = safedirpath(target, uid, gid, user, flags,
589 if ((uid == 0 || bitset(SFF_SAFEDIRPATH, flags)) &&
618 if (uid == 0 && !bitset(SFF_ROOTOK|SFF_OPENASROOT, flags))
635 if (stbuf.st_uid == uid &&
907 sm_dprintf(" uid = %ld/%ld\n",