Home
last modified time | relevance | path

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

12

/DragonOS/kernel/src/namespaces/
H A Ducount.rs43 uid: usize, field
58 uid: 0, in new()
69 fn alloc_ucounts(&self, ns: Arc<UserNamespace>, uid: usize) -> Arc<Self> { in alloc_ucounts()
73 uid, in alloc_ucounts()
82 uid, in alloc_ucounts()
99 uid: usize, in inc_ucounts()
103 let uc = self.alloc_ucounts(user_ns, uid); in inc_ucounts()
121 fn find_ucounts(user_ns: Arc<UserNamespace>, uid: usize) -> Option<Arc<UCounts>> { in find_ucounts()
123 let key = UKey { user_ns, uid }; in find_ucounts()
131 uid: uc.uid, in get_ucounts()
[all …]
/DragonOS/user/apps/test_cred/
H A Dmain.c13 int uid = getuid(); in main() local
14 assert(uid == 1000); in main()
15 printf("Current uid:%d\n\n", uid); in main()
/DragonOS/user/apps/user-manage/src/check/
H A Dcheck.rs38 info.uid = arg.clone(); in check()
64 if info.uid.is_empty() { in check()
86 uid: Some(info.uid.clone()), in check()
202 uid: None, in check()
268 uid: None, in check()
277 uid: info.new_uid.clone(), in check()
359 let uid = unsafe { libc::geteuid().to_string() }; in check() localVariable
360 let cur_username = Self::cur_username(uid.clone()); in check()
367 if uid != "0" && cur_username != username { in check()
378 uid: None, in check()
[all …]
H A Dinfo.rs6 pub uid: String, field
22 info.username, info.uid, info.gid, info.comment, info.home_dir, info.shell in from()
/DragonOS/tools/
H A Dumount_virt_disk.sh2 uid=`id -u`
3 if [ ! $uid == "0" ];then
H A Dmount_virt_disk.sh2 uid=`id -u`
3 if [ ! $uid == "0" ];then
/DragonOS/kernel/src/filesystem/vfs/
H A Dopen.rs73 uid: usize, in do_fchownat()
102 return chown_common(inode, uid, gid); in do_fchownat()
105 fn chown_common(inode: Arc<dyn IndexNode>, uid: usize, gid: usize) -> Result<usize, SystemError> { in chown_common()
108 let current_uid = cred.uid.data(); in chown_common()
118 meta.uid = uid; in chown_common()
123 if current_uid != meta.uid || uid != meta.uid { in chown_common()
139 pub fn ksys_fchown(fd: i32, uid: usize, gid: usize) -> Result<usize, SystemError> { in ksys_fchown()
145 let result = chown_common(inode, uid, gid); in ksys_fchown()
H A Dsyscall.rs104 uid: i32, field
131 uid: 0, in new()
1314 kstat.uid = metadata.uid as i32; in do_fstat()
1439 tmp.stx_uid = metadata.uid as u32; in do_statx()
1645 pub fn chown(pathname: *const u8, uid: usize, gid: usize) -> Result<usize, SystemError> { in chown()
1652 uid, in chown()
1658 pub fn lchown(pathname: *const u8, uid: usize, gid: usize) -> Result<usize, SystemError> { in lchown()
1665 uid, in lchown()
1674 uid: usize, in fchownat()
1683 return do_fchownat(dirfd, pathname, uid, gid, flags); in fchownat()
[all …]
H A Dmod.rs760 pub uid: usize, field
783 uid: 0, in default()
919 uid: 0, in new()
/DragonOS/kernel/src/process/
H A Dcred.rs29 pub uid: Kuid, field
61 uid: GLOBAL_ROOT_UID, in init()
134 pub fn setuid(&mut self, uid: usize) { in setuid()
135 self.uid.0 = uid; in setuid()
H A Dsyscall.rs297 return Ok(pcb.cred.lock().uid.data()); in getuid()
315 pub fn setuid(uid: usize) -> Result<usize, SystemError> { in setuid()
319 if guard.uid.data() == 0 { in setuid()
320 guard.setuid(uid); in setuid()
321 guard.seteuid(uid); in setuid()
322 guard.setsuid(uid); in setuid()
323 } else if uid == guard.uid.data() || uid == guard.suid.data() { in setuid()
324 guard.seteuid(uid); in setuid()
394 if fsuid == guard.uid || fsuid == guard.euid || fsuid == guard.suid { in setfsuid()
/DragonOS/kernel/src/filesystem/devfs/
H A Dnull_dev.rs51 uid: 0, in new()
105 inode.metadata.uid = metadata.uid; in set_metadata()
H A Dzero_dev.rs51 uid: 0, in new()
105 inode.metadata.uid = metadata.uid; in set_metadata()
H A Dmod.rs285 uid: 0, in new_with_parent()
376 uid: 0, in do_create_with_data()
530 inode.metadata.uid = metadata.uid; in set_metadata()
/DragonOS/kernel/src/ipc/
H A Dshm.rs180 uid: 0, in add()
462 self.kern_ipc_perm.uid = shm_id_ds.uid() as usize; in copy_from()
487 uid: usize, field
609 pub fn uid(&self) -> u32 { in uid() method
610 self.shm_perm.uid in uid()
629 uid: u32, field
646 pub fn new(key: i32, uid: u32, gid: u32, cuid: u32, cgid: u32, mode: u32) -> Self { in new()
649 uid, in new()
/DragonOS/user/apps/user-manage/
H A DREADME.md7 useradd -c \<comment\> -d \<home\> -G \<group\> -g \<gid\> -s \<shell\> -u \<uid\> username
59 -u\<uid\>  修改用户 ID。
/DragonOS/kernel/src/driver/disk/ahci/
H A Dahci_inode.rs56 uid: 0, in new()
110 inode.metadata.uid = metadata.uid; in set_metadata()
/DragonOS/user/apps/test-chown/src/
H A Dmain.rs20 let uid = metadata.uid(); in print_file_owner_group() localVariable
24 assert!(uid > 0, "UID should be greater than 0"); in print_file_owner_group()
/DragonOS/kernel/src/virt/kvm/
H A Dkvm_dev.rs69 uid: 0, in new()
124 inode.metadata.uid = metadata.uid; in set_metadata()
H A Dvcpu_dev.rs80 uid: 0, in new()
132 inode.metadata.uid = metadata.uid; in set_metadata()
H A Dvm_dev.rs78 uid: 0, in new()
130 inode.metadata.uid = metadata.uid; in set_metadata()
/DragonOS/kernel/src/driver/keyboard/
H A Dps2_keyboard.rs92 uid: 0, in new()
159 inode.metadata.uid = metadata.uid; in set_metadata()
/DragonOS/kernel/src/filesystem/ramfs/
H A Dmod.rs92 uid: 0, in new()
285 inode.metadata.uid = metadata.uid; in set_metadata()
338 uid: 0, in create_with_data()
600 uid: 0, in mknod()
/DragonOS/user/apps/test_shm/
H A Dtest_info.c16 printf("uid: %d\n", shm_perm.uid); in print_shmidds()
/DragonOS/kernel/src/syscall/
H A Dmod.rs1000 let uid = args[1]; in handle() localVariable
1002 Self::fchown(dirfd, uid, gid) in handle()
1007 let uid = args[1]; in handle() localVariable
1009 Self::chown(pathname, uid, gid) in handle()
1014 let uid = args[1]; in handle() localVariable
1016 Self::lchown(pathname, uid, gid) in handle()
1021 let uid = args[2]; in handle() localVariable
1024 Self::fchownat(dirfd, pathname, uid, gid, flag) in handle()

12