bool bval;
handle->conn->have_proc_fds = sys_have_proc_fds();
+#ifdef DISABLE_PROC_FDS
+ handle->conn->have_proc_fds = false;
+#endif
/*
* assume the kernel will support openat2(),
handle->conn->open_how_resolve |=
VFS_OPEN_HOW_RESOLVE_NO_SYMLINKS;
}
+#ifdef DISABLE_VFS_OPEN_HOW_RESOLVE_NO_SYMLINKS
+ handle->conn->open_how_resolve &= ~VFS_OPEN_HOW_RESOLVE_NO_SYMLINKS;
+#endif
return 0; /* Return >= 0 for success */
}
}
done:
- fsp->fsp_flags.have_proc_fds = fsp->conn->have_proc_fds;
+ if (result >= 0) {
+ fsp->fsp_flags.have_proc_fds = fsp->conn->have_proc_fds;
+ } else {
+ /*
+ * "/proc/self/fd/-1" never exists. Indicate to upper
+ * layers that for this fsp a possible name-based
+ * fallback is the only way to go.
+ */
+ fsp->fsp_flags.have_proc_fds = false;
+ }
out:
END_PROFILE(syscall_openat);
case FSCTL_CREATE_OR_GET_OBJECT_ID:
{
unsigned char objid[16];
- char *return_data = NULL;
+ uint8_t *return_data = NULL;
/* This should return the object-id on this file.
* I think I'll make this be the inode+dev. JRA.
*out_len = MIN(max_out_len, 64);
/* Hmmm, will this cause problems if less data asked for? */
- return_data = talloc_array(ctx, char, 64);
+ return_data = talloc_array(ctx, uint8_t, 64);
if (return_data == NULL) {
return NT_STATUS_NO_MEMORY;
}
/* For backwards compatibility only store the dev/inode. */
push_file_id_16(return_data, &fsp->file_id);
memcpy(return_data+16,create_volume_objectid(fsp->conn,objid),16);
- push_file_id_16(return_data+32, &fsp->file_id);
+ push_file_id_16(return_data + 32, &fsp->file_id);
memset(return_data+48, 0, 16);
- *out_data = return_data;
+ *_out_data = return_data;
return NT_STATUS_OK;
}
case FSCTL_GET_REPARSE_POINT:
{
+ uint32_t tag;
status = fsctl_get_reparse_point(
- fsp, ctx, out_data, max_out_len, out_len);
+ fsp, ctx, &tag, _out_data, max_out_len, out_len);
return status;
}