mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-29 12:32:16 +08:00
libfs: Always use geteuid() and getegid()
The two functions are independent of the POSIX API.
This commit is contained in:
@@ -66,13 +66,8 @@ IMFS_jnode_t *IMFS_allocate_node(
|
||||
* Fill in the mode and permission information for the jnode structure.
|
||||
*/
|
||||
node->st_mode = mode;
|
||||
#if defined(RTEMS_POSIX_API)
|
||||
node->st_uid = geteuid();
|
||||
node->st_gid = getegid();
|
||||
#else
|
||||
node->st_uid = 0;
|
||||
node->st_gid = 0;
|
||||
#endif
|
||||
node->st_uid = geteuid();
|
||||
node->st_gid = getegid();
|
||||
|
||||
/*
|
||||
* Now set all the times.
|
||||
|
||||
@@ -609,13 +609,8 @@ rtems_rfs_rtems_mknod (const rtems_filesystem_location_info_t *parentloc,
|
||||
gid_t gid;
|
||||
int rc;
|
||||
|
||||
#if defined(RTEMS_POSIX_API)
|
||||
uid = geteuid ();
|
||||
gid = getegid ();
|
||||
#else
|
||||
uid = 0;
|
||||
gid = 0;
|
||||
#endif
|
||||
|
||||
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
|
||||
rtems_rfs_rtems_imode (mode),
|
||||
|
||||
Reference in New Issue
Block a user