From f2a1ba5002c70da934fed9874bfe90e11ab92e17 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 22 Mar 2013 15:30:16 +0100 Subject: libfs: Always use geteuid() and getegid() The two functions are independent of the POSIX API. --- cpukit/libfs/src/imfs/imfs_creat.c | 9 ++------- cpukit/libfs/src/rfs/rtems-rfs-rtems.c | 5 ----- 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'cpukit/libfs') diff --git a/cpukit/libfs/src/imfs/imfs_creat.c b/cpukit/libfs/src/imfs/imfs_creat.c index 38c8385f43..5454f0305e 100644 --- a/cpukit/libfs/src/imfs/imfs_creat.c +++ b/cpukit/libfs/src/imfs/imfs_creat.c @@ -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. diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c index fad2993f9b..6f6271a361 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c @@ -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), -- cgit v1.2.3