fixing opening dir as a file

open a of a directory with a NON_DIRECTORY_FILE specified should return
FILE_IS_A_DIRECTORY
This commit is contained in:
Olga Kornievskaia 2012-03-14 14:17:06 -04:00
parent 4017b235db
commit 1a00a0bdce
2 changed files with 3 additions and 2 deletions

View file

@ -498,7 +498,7 @@ static int handle_open(nfs41_upcall *upcall)
if (args->create_opts & FILE_NON_DIRECTORY_FILE) {
eprintf("trying to open directory %s as a file\n",
state->path.path);
status = ERROR_ACCESS_DENIED;
status = ERROR_DIRECTORY;
goto out_free_state;
}
} else if (info.type == NF4REG) {