Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
}
struct have_file_open_below_state {
+ bool dirfsp_is_posix;
bool found_one;
};
return 0;
}
- if (e->flags & SHARE_MODE_FLAG_POSIX_OPEN) {
+ if (state->dirfsp_is_posix &&
+ e->flags & SHARE_MODE_FLAG_POSIX_OPEN)
+ {
/* Ignore POSIX opens */
return 0;
}
bool have_file_open_below(struct files_struct *fsp)
{
struct have_file_open_below_state state = {
- .found_one = false,
+ .dirfsp_is_posix = fsp->fsp_flags.posix_open,
};
int ret;