Commit 6fdfd405 authored by Marc Vef's avatar Marc Vef
Browse files

Small permission fixes

parent 337d171c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -30,11 +30,11 @@
#define MDATA_USE_BLOCKS false
#define MDATA_USE_SIZE true // XXX to be added in ADAFS_DATA. currently on by default

// should permissions be checked when access() is called or discarded
// should permissions be checked when access() is called or discarded (disabled by default)
//#define CHECK_ACCESS
// If access permissions should be checked while opening a file
// If access permissions should be checked while opening a file (disabled by default)
//#define CHECK_ACCESS_DURING_OPEN
// If disabled, a file or directory is always presumed to be there (even if it is not). No check is executed
// If disabled, a file or directory is always presumed to be there (even if it is not). No check is executed (enabled by default)
#define DO_LOOKUP

// Write-ahead logging of rocksdb
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ int check_access_mask(const string& path, const int mask) {
     * According to POSIX (access(2)) the mask is either the value F_OK,
     * or a mask consisting of the bitwise OR of one or more of R_OK, W_OK, and X_OK.
     */
    if (mask & F_OK)
    if (mask == F_OK)
        return 0;

    // root user is a god
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ int adafs_access(const std::string& path, const int mask) {
    // object is assumed to be existing, even though it might not
    return 0;
#endif
#if defined(CHECK_ACCESS_DURING_OPEN)
#if defined(CHECK_ACCESS)
    return rpc_send_access(path, mask);
#else
    return rpc_send_access(path, F_OK); // Only check for file exists
+3 −1
Original line number Diff line number Diff line
@@ -10,9 +10,11 @@ include_directories(${MPI_INCLUDE_PATH})

set(SOURCE_FILES main.cpp)
set(SOURCE_FILES_MPI main_MPI.cpp)
set(SOURCE_FILES_TEMP main_temp_testing.cpp)
set(SOURCE_FILES_IO main_IO_testing.cpp)
set(SOURCE_FILES_TEMP main_temp.cpp)
add_executable(ifs_test ${SOURCE_FILES})
add_executable(ifs_test_MPI ${SOURCE_FILES_MPI})
add_executable(ifs_test_IO ${SOURCE_FILES_IO})
add_executable(ifs_test_temp ${SOURCE_FILES_TEMP})

target_link_libraries(ifs_test_MPI ${MPI_CXX_LIBRARIES})
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ int main(int argc, char* argv[]) {
    // Part


    char buf1[] = "penis";
    char buf1[] = "oops.";
    auto fd1 = open(p.c_str(), O_WRONLY | O_APPEND, 0777);
//    auto nw1 = pwrite(fd1, &buf1, strlen(buf1), 1615);
    auto nw1 = write(fd1, &buf1, strlen(buf1));
Loading