Documentation/translations/zh_CN/security/sak.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/security/sak.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/security/sak.rst- Extension
.rst- Size
- 3183 bytes
- Lines
- 87
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
.. include:: ../disclaimer-zh_CN.rst
:Original: Documentation/security/sak.rst
:翻译:
张巍 zhangwei <zhangwei@cqsoftware.com.cn>
===========================
Linux 安全注意键(SAK)处理
===========================
:日期: 2001年3月18日
:作者: Andrew Morton
操作系统的安全注意键是一种安全工具,用于防止系统上存在特洛伊
木马密码捕获程序。它提供了一种无法规避的方式,用于终止所有可
能伪装成登录应用程序的程序。用户需要在登录系统之前输入这个安
全键。
从键盘输入的方式生成安全注意键,Linux提供了两种相似但不同的
方式。一种是按下ALT-SYSRQ-K组合键,但你不应该使用这种方式,
因为它只有在内核启用了SYSRQ支持的情况下才能使用。
正确生成SAK的方式是使用``loadkeys``来定义键序列。无论内核是否
编译了sysrq支持,这种方式都能够正常工作。
当键盘处于原始模式时,SAK 能够正常工作。这意味着,一旦定义,
SAK 将终止正在运行的 X 服务器。如果系统处于运行级别 5,X 服
务器将重新启动,这正是你希望发生的情况。
你应该使用什么键序列? CTRL-ALT-DEL用于重启机器,CTRL-ALT-
BACKSPACE对X服务器有特殊作用。我们将选择CTRL-ALT-PAUSE。
在你的rc.sysinit(或rc.local)文件中,添加以下命令::
echo "Control Alt keycode 101 = SAK" | /bin/loadkeys
就这样!只有超级用户才能重新编程SAK键。
.. note::
1. Linux SAK据说并不是C2级安全性的系统所要求的"真正的SAK"。
该原因作者也不知道
2. 在键盘输入的模式下,SAK会终止所有打开了/dev/console的应用
程序。
但是不幸的是,这也包括一些你实际上不希望被终止的程序。原因是
这些程序错误的保持了/dev/console的打开状态。务必确保向你的
Linux发行版提供商投诉这个问题。
你可以用以下的命令来识别将被SAK终止的程序::
# ls -l /proc/[0-9]*/fd/* | grep console
l-wx------ 1 root root 64 Mar 18 00:46 /proc/579/fd/0 -> /dev/console
然后::
# ps aux|grep 579
root 579 0.0 0.1 1088 436 ? S 00:43 0:00 gpm -t ps/2
所以``gpm``会被SAK杀死。这应该gpm中的bug。它应该正在关闭标准输入,
你可以通过查找initscript来启动gpm并更改它:
老的::
daemon gpm
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.