return NT_STATUS_NO_MEMORY;
}
- conn = talloc_zero(frame, connection_struct);
- if (conn == NULL) {
- TALLOC_FREE(frame);
- DEBUG(0, ("talloc failed\n"));
- return NT_STATUS_NO_MEMORY;
- }
+ status = create_conn_struct(ctx,
+ server_event_context(),
+ server_messaging_context(),
+ &conn,
+ -1,
+ "/",
+ NULL);
- if (!(conn->params = talloc(conn, struct share_params))) {
- DEBUG(0, ("talloc failed\n"));
- TALLOC_FREE(frame);
- return NT_STATUS_NO_MEMORY;
- }
-
- conn->params->service = -1;
-
- set_conn_connectpath(conn, "/");
-
- if (!smbd_vfs_init(conn)) {
- DEBUG(0,("smbd_vfs_init() failed!\n"));
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0,("create_conn_struct returned %s.\n",
+ nt_errstr(status)));
TALLOC_FREE(frame);
- return NT_STATUS_INTERNAL_ERROR;
+ return status;
}
status = SMB_VFS_GET_NT_ACL(conn, fname, security_info_wanted, ctx, sd);