summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-12-22 07:56:57 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-01-05 14:29:09 +0100
commitf9f7321e0a7d6f1178687668bec7fe2edb378d42 (patch)
tree8793dff4f74f616291084b08db3e2652bade344c /cpukit/libfs/src/rfs/rtems-rfs-rtems.c
parentdoc: Mention potential SMP scheduler improvement (diff)
downloadrtems-f9f7321e0a7d6f1178687668bec7fe2edb378d42.tar.bz2
Filesystem: Remove superfluous permission checks
The permission is check by the upper layer.
Diffstat (limited to '')
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-rtems.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
index a0ade04ba0..d3393d672a 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
@@ -274,9 +274,6 @@ rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
rtems_rfs_inode_handle inode;
-#if defined (RTEMS_POSIX_API)
- uid_t uid;
-#endif
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_CHOWN))
@@ -289,20 +286,6 @@ rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
return rtems_rfs_rtems_error ("chown: opening inode", rc);
}
- /*
- * Verify I am the owner of the node or the super user.
- */
-
-#if defined (RTEMS_POSIX_API)
- uid = geteuid();
-
- if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
- {
- rtems_rfs_inode_close (fs, &inode);
- return rtems_rfs_rtems_error ("chown: not able", EPERM);
- }
-#endif
-
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);