481{
486
489 eprintf(
"create_open_state(%d) failed with %d\n",
492 }
494
495
498 else
500
501
504
507
508 do {
511 goto out_free_state;
512 }
513
514
518
520 goto out_free_state;
521 }
522
523
527
533 }
534 goto out_free_state;
535 }
536
537
540 dprintf(2,
"handle_nfs41_open: DIRECTORY\n");
542 eprintf(
"trying to open directory %s as a file\n",
545 goto out_free_state;
546 }
548 dprintf(2,
"handle nfs41_open: FILE\n");
550 eprintf(
"trying to open file %s as a directory\n",
553 goto out_free_state;
554 }
556 dprintf(2,
"handle nfs41_open: SYMLINK\n");
558
559
565 } else {
566
570 eprintf(
"nfs41_symlink_target() for %s failed with %d\n",
572 } else {
573
576 }
577 goto out_free_state;
578 }
579 } else
580 dprintf(2,
"handle_open(): unsupported type=%d\n",
info.type);
583 goto out_free_state;
584
585
586
587
588
589
590
591
592
593
594
597 args->access_mode == 0 &&
599
602 goto out_free_state;
603 }
604
605
606 dprintf(1,
"trying to create a symlink, deferring create\n");
607
608
609
610 state->file.fh.superblock =
state->parent.fh.superblock;
611
613 }
else if (
args->symlink.len) {
614
619 createattrs.
mode = 0777;
620
621 dprintf(1,
"creating cygwin symlink %s -> %s\n",
622 state->file.name.name,
args->symlink.path);
623
627 eprintf(
"nfs41_create() for symlink=%s failed with %s\n",
630 goto out_free_state;
631 }
640 goto out_free_state;
641 }
642
647 } else {
650
657 goto out_free_state;
658 }
661 }
669
676 goto out_free_state;
677
681 goto out_free_state;
682 }
683
684supersede_retry:
685
691
696 goto out_free_state;
697 }
698
703 } else {
705 createattrs.
size = 0;
710 args->deleg_type =
state->delegation.state->state.type;
711 }
717 goto supersede_retry;
719 goto out_free_state;
720 } else {
725 }
726
727
731 }
732 }
733
738out_free_state:
741}
#define FILE_DIRECTORY_FILE
#define FILE_NON_DIRECTORY_FILE
int nfs41_ea_set(IN nfs41_open_state *state, IN PFILE_FULL_EA_INFORMATION ea)
int nfs41_lookup(IN nfs41_root *root, IN nfs41_session *session, IN OUT nfs41_abs_path *path_inout, OUT OPTIONAL nfs41_path_fh *parent_out, OUT OPTIONAL nfs41_path_fh *target_out, OUT OPTIONAL nfs41_file_info *info_out, OUT nfs41_session **session_out)
static int map_disposition_2_nfsopen(ULONG disposition, int in_status, bool_t persistent, uint32_t *create, uint32_t *createhowmode, uint32_t *last_error)
void nfs41_open_state_ref(IN nfs41_open_state *state)
static int create_open_state(IN const char *path, IN uint32_t open_owner_id, OUT nfs41_open_state **state_out)
static BOOLEAN open_for_attributes(uint32_t type, ULONG access_mask, ULONG disposition, int status)
static int create_with_ea(IN uint32_t disposition, IN uint32_t lookup_status)
static int check_execute_access(nfs41_open_state *state)
static int open_or_delegate(IN OUT nfs41_open_state *state, IN uint32_t create, IN uint32_t createhow, IN nfs41_file_info *createattrs, IN bool_t try_recovery, OUT nfs41_file_info *info)
static void map_access_2_allowdeny(ULONG access_mask, ULONG access_mode, ULONG disposition, uint32_t *allow, uint32_t *deny)
void nfs_to_standard_info(IN const nfs41_file_info *info, OUT PFILE_STANDARD_INFO std_out)
void nfs_to_basic_info(IN const nfs41_file_info *info, OUT PFILE_BASIC_INFO basic_out)
int map_symlink_errors(int status)
void abs_path_copy(OUT nfs41_abs_path *dst, IN const nfs41_abs_path *src)
#define FILE_OPEN_REPARSE_POINT
GLint GLint GLsizei GLsizei GLsizei depth
#define ERROR_FILE_NOT_FOUND
static __inline nfs41_session * nfs41_root_session(IN nfs41_root *root)
#define NFS41_MAX_SYMLINK_DEPTH
#define CREATE_SESSION4_FLAG_PERSIST
int nfs41_create(IN nfs41_session *session, IN uint32_t type, IN nfs41_file_info *createattrs, IN OPTIONAL const char *symlink, IN nfs41_path_fh *parent, OUT nfs41_path_fh *file, OUT nfs41_file_info *info)
int nfs41_symlink_follow(IN nfs41_root *root, IN nfs41_session *session, IN nfs41_path_fh *symlink, OUT nfs41_file_info *info)
int nfs41_symlink_target(IN nfs41_session *session, IN nfs41_path_fh *file, OUT nfs41_abs_path *target)
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_SYSTEM
#define FILE_WRITE_ATTRIBUTES
#define FILE_ATTRIBUTE_ARCHIVE
#define ERROR_TOO_MANY_LINKS
#define ERROR_FILE_EXISTS
#define ERROR_BAD_FILE_TYPE