我可以在 Vista 和 Windows 7 用户模式下获得对原始磁盘扇区的写访问权限吗?

发布于 2024-12-25 10:31:31 字数 1376 浏览 7 评论 0原文

来自 RawDisk 网站

Windows Vista 的新安全模型对在用户模式下执行的应用程序施加了严格的限制。即使具有提升的管理权限,应用程序也无法获得对原始磁盘扇区的写访问权限。

这是真的吗?

来自 Microsoft 文档

如果卷未安装或如果卷没有文件系统,则对文件系统和存储堆栈的更改不适用。< /strong>

请提供

  • 确认 RawDisk 网站的 Microsoft 官方文档链接
  • 或工作代码示例。 (显然我未能创建一个,如果设置了 GENERIC_WRITE,CreateFile() 调用会失败,并显示 ERROR_ACCESS_DENIED。)

我拥有的其他相关 Microsoft 文档远发现:

From the RawDisk website:

The new security model of Windows Vista puts tight restrictions on applications executed in user mode. Even with elevated administrative rights, the application can’t get write access to raw disk sectors.

Is this true?

From the Microsoft doc:

The changes to the file system and to the storage stack do not apply if the volume is not mounted or if the volume has no file system.

Please give

  • either a link to the official Microsoft doc confirming the RawDisk website
  • or a working code example. (I obviously failed to create one, CreateFile() call fails with ERROR_ACCESS_DENIED if GENERIC_WRITE is set.)

Other relevant Microsoft docs that I have so far found:

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别挽留 2025-01-01 10:31:31

是的。您链接到的第一篇文章提供了更长的例外列表:

  • 如果文件系统未安装
  • 如果文件系统已被锁定。
  • 如果写入的扇区驻留在文件系统空间之外(这包括引导扇区,以及显然所有扇区都在文件系统之外的“无文件系统”情况)
  • 如果写入请求已由内核模式驱动程序标记。

显然,最后一个例外与你无关。用户模式与内核模式相反。其他例外情况仍然适用。

Yes. The first article you link to provides a longer list of exceptions:

  • if the file system is not mounted
  • if the file system has been locked.
  • if the sectors being written to reside outside file system space (this includes the boot sectors, and the "no file system" case where obviously all sectors are outside the file system)
  • if the write request has been flagged by a kernel-mode driver.

Obviously, the last exception is irrelevant to you. User mode is the opposite of kernel mode. The other exceptions still apply.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文