From f9f7321e0a7d6f1178687668bec7fe2edb378d42 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 22 Dec 2015 07:56:57 +0100 Subject: Filesystem: Remove superfluous permission checks The permission is check by the upper layer. --- cpukit/libfs/src/imfs/imfs_chown.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'cpukit/libfs/src/imfs/imfs_chown.c') diff --git a/cpukit/libfs/src/imfs/imfs_chown.c b/cpukit/libfs/src/imfs/imfs_chown.c index 9f96133556..ca48eee006 100644 --- a/cpukit/libfs/src/imfs/imfs_chown.c +++ b/cpukit/libfs/src/imfs/imfs_chown.c @@ -30,24 +30,10 @@ int IMFS_chown( gid_t group ) { - IMFS_jnode_t *jnode; -#if defined(RTEMS_POSIX_API) - uid_t st_uid; -#endif + IMFS_jnode_t *jnode; jnode = (IMFS_jnode_t *) loc->node_access; - /* - * Verify I am the owner of the node or the super user. - */ - -#if defined(RTEMS_POSIX_API) - st_uid = geteuid(); - - if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) - rtems_set_errno_and_return_minus_one( EPERM ); -#endif - jnode->st_uid = owner; jnode->st_gid = group; -- cgit v1.2.3