Home
last modified time | relevance | path

Searched refs:gid (Results 1 – 25 of 29) sorted by relevance

12

/DragonOS/user/apps/user-manage/src/check/
H A Dcheck.rs44 info.gid = arg.clone(); in check()
99 if info.group.is_empty() && info.gid.is_empty() { in check_group_gid()
112 let (groupname, gid) = (data[0].to_string(), data[2].to_string()); in check_group_gid()
114 if !info.gid.is_empty() && info.gid != gid { in check_group_gid()
116 format!("The gid of the group [{}] isn't {}", info.group, info.gid), in check_group_gid()
119 } else if info.gid.is_empty() || info.gid == gid { in check_group_gid()
120 info.gid = gid; in check_group_gid()
125 if !info.gid.is_empty() && info.gid == gid { in check_group_gid()
128 format!("The gid of the group [{}] isn't {}", info.group, info.gid), in check_group_gid()
150 let mut gid = (max_gid + 1).to_string(); in check_group_gid() localVariable
[all …]
H A Dinfo.rs7 pub gid: String, field
22 info.username, info.uid, info.gid, info.comment, info.home_dir, info.shell in from()
59 pub gid: String, field
69 format!("{}:{}:{}:\n", self.groupname, passwd, self.gid) in to_string_group()
92 pub gid: String, field
/DragonOS/user/apps/test_cred/
H A Dmain.c20 int gid = getgid(); in main() local
21 assert(gid == 1000); in main()
22 printf("Current gid:%d\n\n", gid); in main()
/DragonOS/user/apps/user-manage/
H A DREADME.md7 useradd -c \<comment\> -d \<home\> -G \<group\> -g \<gid\> -s \<shell\> -u \<uid\> username
86 groupadd -g\<gid\> -p\<passwd\> groupname
89 -g\<gid\> 指定组 id
117 groupadd -g\<new gid\> -n\<new groupname\> groupname
120 -g 设置新 gid
/DragonOS/kernel/src/filesystem/vfs/
H A Dopen.rs74 gid: 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()
109 let current_gid = cred.gid.data(); in chown_common()
119 meta.gid = gid; in chown_common()
126 if gid != current_gid && !group_info.gids.contains(&Kgid::from(gid)) { in chown_common()
129 meta.gid = gid; 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.rs106 gid: i32, field
132 gid: 0, in new()
1315 kstat.gid = metadata.gid as i32; in do_fstat()
1442 tmp.stx_gid = metadata.gid as u32; in do_statx()
1645 pub fn chown(pathname: *const u8, uid: usize, gid: usize) -> Result<usize, SystemError> { in chown()
1653 gid, in chown()
1658 pub fn lchown(pathname: *const u8, uid: usize, gid: usize) -> Result<usize, SystemError> { in lchown()
1666 gid, in lchown()
1675 gid: usize, in fchownat()
1683 return do_fchownat(dirfd, pathname, uid, gid, flags); in fchownat()
[all …]
H A Dmod.rs763 pub gid: usize, field
784 gid: 0, in default()
920 gid: 0, in new()
/DragonOS/kernel/src/process/
H A Dcred.rs31 pub gid: Kgid, field
62 gid: GLOBAL_ROOT_GID, in init()
150 pub fn setgid(&mut self, gid: usize) { in setgid()
151 self.gid.0 = gid; in setgid()
H A Dsyscall.rs360 return Ok(pcb.cred.lock().gid.data()); in getgid()
390 pub fn setgid(gid: usize) -> Result<usize, SystemError> { in setgid()
395 guard.setgid(gid); in setgid()
396 guard.setegid(gid); in setgid()
397 guard.setsgid(gid); in setgid()
398 guard.setfsgid(gid); in setgid()
399 } else if guard.gid.data() == gid || guard.sgid.data() == gid { in setgid()
400 guard.setegid(gid); in setgid()
401 guard.setfsgid(gid); in setgid()
466 if fsgid == guard.gid || fsgid == guard.egid || fsgid == guard.sgid { in setfsgid()
/DragonOS/kernel/src/filesystem/devfs/
H A Dnull_dev.rs52 gid: 0, in new()
106 inode.metadata.gid = metadata.gid; in set_metadata()
H A Dzero_dev.rs52 gid: 0, in new()
106 inode.metadata.gid = metadata.gid; in set_metadata()
H A Dmod.rs286 gid: 0, in new_with_parent()
377 gid: 0, in do_create_with_data()
531 inode.metadata.gid = metadata.gid; in set_metadata()
/DragonOS/kernel/src/ipc/
H A Dshm.rs181 gid: 0, in add()
463 self.kern_ipc_perm.gid = shm_id_ds.gid() as usize; in copy_from()
489 gid: usize, field
613 pub fn gid(&self) -> u32 { in gid() method
614 self.shm_perm.gid in gid()
631 gid: u32, field
646 pub fn new(key: i32, uid: u32, gid: u32, cuid: u32, cgid: u32, mode: u32) -> Self { in new()
650 gid, in new()
/DragonOS/user/apps/test-chown/src/
H A Dmain.rs21 let gid = metadata.gid(); in print_file_owner_group() localVariable
25 assert!(gid > 0, "GID should be greater than 0"); in print_file_owner_group()
/DragonOS/kernel/src/virt/kvm/
H A Dkvm_dev.rs70 gid: 0, in new()
125 inode.metadata.gid = metadata.gid; in set_metadata()
H A Dvcpu_dev.rs81 gid: 0, in new()
133 inode.metadata.gid = metadata.gid; in set_metadata()
H A Dvm_dev.rs79 gid: 0, in new()
131 inode.metadata.gid = metadata.gid; in set_metadata()
/DragonOS/kernel/src/driver/keyboard/
H A Dps2_keyboard.rs93 gid: 0, in new()
160 inode.metadata.gid = metadata.gid; in set_metadata()
/DragonOS/kernel/src/filesystem/ramfs/
H A Dmod.rs93 gid: 0, in new()
286 inode.metadata.gid = metadata.gid; in set_metadata()
339 gid: 0, in create_with_data()
601 gid: 0, in mknod()
/DragonOS/user/apps/test_shm/
H A Dtest_info.c17 printf("gid: %d\n", shm_perm.gid); in print_shmidds()
/DragonOS/kernel/src/syscall/
H A Dmod.rs1016 let gid = args[2]; in handle() localVariable
1017 Self::fchown(dirfd, uid, gid) in handle()
1023 let gid = args[2]; in handle() localVariable
1024 Self::chown(pathname, uid, gid) in handle()
1030 let gid = args[2]; in handle() localVariable
1031 Self::lchown(pathname, uid, gid) in handle()
1037 let gid = args[3]; in handle() localVariable
1039 Self::fchownat(dirfd, pathname, uid, gid, flag) in handle()
/DragonOS/kernel/src/filesystem/procfs/
H A Dmod.rs343 gid: 0, in new()
577 inode.metadata.gid = metadata.gid; in set_metadata()
631 gid: 0, in create_with_data()
/DragonOS/user/apps/user-manage/src/executor/
H A Dexecutor.rs381 if let Some(gid) = &info.new_gid { in update_group_file()
383 if gid != fields[2] { in update_group_file()
709 if field[3] == info.gid { in update_passwd_file()
/DragonOS/kernel/src/filesystem/devpts/
H A Dmod.rs116 gid: 0, in new()
/DragonOS/kernel/src/filesystem/kernfs/
H A Dmod.rs91 gid: 0, in create_root_inode()
522 gid: 0, in inner_create()

12