From bc2db66fcb1635b41b453e953e8332bbe97b81c7 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 7 Nov 2001 23:54:59 +0000 Subject: 2001-11-07 Jennifer Averett Reported by Ibragimov Ilya and tracked as PR63. * libc/chdir.c: Check for search/execute permissions on chdir. This requires passing RTEMS_LIBIO_PERMS_SEARCH to rtems_filesystem_evaluate_path(). --- c/src/exec/libcsupport/src/chdir.c | 3 ++- c/src/lib/ChangeLog | 7 +++++++ c/src/lib/libc/chdir.c | 3 ++- cpukit/libcsupport/src/chdir.c | 3 ++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/c/src/exec/libcsupport/src/chdir.c b/c/src/exec/libcsupport/src/chdir.c index ca20919e93..a8322e91d0 100644 --- a/c/src/exec/libcsupport/src/chdir.c +++ b/c/src/exec/libcsupport/src/chdir.c @@ -33,7 +33,8 @@ int chdir( * Get the node where we wish to go. */ - result = rtems_filesystem_evaluate_path( pathname, 0, &loc, TRUE ); + result = rtems_filesystem_evaluate_path( + pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, TRUE ); if ( result != 0 ) return -1; diff --git a/c/src/lib/ChangeLog b/c/src/lib/ChangeLog index a7418f9bbe..5d1f476c1f 100644 --- a/c/src/lib/ChangeLog +++ b/c/src/lib/ChangeLog @@ -1,3 +1,10 @@ +2001-11-07 Jennifer Averett + + Reported by Ibragimov Ilya and tracked as PR63. + * libc/chdir.c: Check for search/execute permissions on chdir. + This requires passing RTEMS_LIBIO_PERMS_SEARCH to + rtems_filesystem_evaluate_path(). + 2001-10-26 Joel Sherrill * libc/libio.c: Cleanup of initialization per suggestion from diff --git a/c/src/lib/libc/chdir.c b/c/src/lib/libc/chdir.c index ca20919e93..a8322e91d0 100644 --- a/c/src/lib/libc/chdir.c +++ b/c/src/lib/libc/chdir.c @@ -33,7 +33,8 @@ int chdir( * Get the node where we wish to go. */ - result = rtems_filesystem_evaluate_path( pathname, 0, &loc, TRUE ); + result = rtems_filesystem_evaluate_path( + pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, TRUE ); if ( result != 0 ) return -1; diff --git a/cpukit/libcsupport/src/chdir.c b/cpukit/libcsupport/src/chdir.c index ca20919e93..a8322e91d0 100644 --- a/cpukit/libcsupport/src/chdir.c +++ b/cpukit/libcsupport/src/chdir.c @@ -33,7 +33,8 @@ int chdir( * Get the node where we wish to go. */ - result = rtems_filesystem_evaluate_path( pathname, 0, &loc, TRUE ); + result = rtems_filesystem_evaluate_path( + pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, TRUE ); if ( result != 0 ) return -1; -- cgit v1.2.3