Beispiel #1
0
NTSTATUS check_name(connection_struct *conn, const char *name)
{
	NTSTATUS status = check_veto_path(conn, name);

	if (!NT_STATUS_IS_OK(status)) {
		return status;
	}

	if (!lp_widelinks(SNUM(conn)) || !lp_symlinks(SNUM(conn))) {
		status = check_reduced_name(conn,name);
		if (!NT_STATUS_IS_OK(status)) {
			DEBUG(5,("check_name: name %s failed with %s\n",name,
						nt_errstr(status)));
			return status;
		}
	}

	return NT_STATUS_OK;
}
Beispiel #2
0
NTSTATUS check_name(connection_struct *conn, const char *name)
{
	if (IS_VETO_PATH(conn, name))  {
		/* Is it not dot or dot dot. */
		if (!((name[0] == '.') && (!name[1] ||
					(name[1] == '.' && !name[2])))) {
			DEBUG(5,("check_name: file path name %s vetoed\n",
						name));
			return map_nt_error_from_unix(ENOENT);
		}
	}

	if (!lp_widelinks(SNUM(conn)) || !lp_symlinks(SNUM(conn))) {
		NTSTATUS status = check_reduced_name(conn,name);
		if (!NT_STATUS_IS_OK(status)) {
			DEBUG(5,("check_name: name %s failed with %s\n",name,
						nt_errstr(status)));
			return status;
		}
	}

	return NT_STATUS_OK;
}