diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-09-11 10:34:02 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-09-12 15:31:12 +0200 |
commit | b6657c395747eedba02409388780ad5f05581322 (patch) | |
tree | 103bebd674a55b80248959552b3d40272cc14346 /cpukit/libfs/src/imfs/imfs_fchmod.c | |
parent | dosfs: Correct handling of iconv() return value (diff) | |
download | rtems-b6657c395747eedba02409388780ad5f05581322.tar.bz2 |
Filesystem: Add and use rtems_filesystem_chmod()
Implement POSIX requirements in the high-level file system layer.
Diffstat (limited to 'cpukit/libfs/src/imfs/imfs_fchmod.c')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_fchmod.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_fchmod.c b/cpukit/libfs/src/imfs/imfs_fchmod.c index ccb344629e..5111944f1c 100644 --- a/cpukit/libfs/src/imfs/imfs_fchmod.c +++ b/cpukit/libfs/src/imfs/imfs_fchmod.c @@ -26,28 +26,10 @@ int IMFS_fchmod( ) { IMFS_jnode_t *jnode; -#if defined(RTEMS_POSIX_API) - uid_t st_uid; -#endif jnode = 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 - - /* - * Change only the RWX permissions on the jnode to mode. - */ - - jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); - jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); + jnode->st_mode = mode; IMFS_update_ctime( jnode ); |