Repository navigation
fix(key): sudo 下 key image、key image-local 在调用者的主目录查找 kvcomm - #862
Merged
Merged
Conversation
- default_kvcomm_dirs 和 key image-local 改用 sudo_caller::home_dir,不再读 HOME 或 getpwuid(getuid()),sudo 下按 SUDO_UID 找到本人的 xwechat 目录 fixed #861 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
修复 #861(#852 复测 #855 时发现):用 sudo 运行时,
key image和key image-local仍到 root 的主目录找kvcomm,分别报none found和ERROR:KVCOMM_NOT_FOUND;给出--kvcomm-dir时可以成功。改动
image_keys::default_kvcomm_dirs不再读环境变量HOME,改用 fix(config): sudo 下使用调用者本人的配置,root 写入的文件交还本人 #860 的sudo_caller::home_dir。key_image_local改为调用image_local_at(sudo_caller::home_dir())。原先的image_local()用HOME或getpwuid(getuid())定位主目录。home_dir回退到dirs::home_dir,即先看HOME。Wiki「密钥获取」已同步:sudo 规则一节和
--kvcomm-dir的默认位置。测试
HOME=/root和SUDO_UID/SUDO_GID/SUDO_USER。key image-local找到 1 个账号;key image不给--kvcomm-dir也能成功,verification为jpeg_decode_and_xor_tail。只读、只看汇总。没有留下/root/.config/weflow。-D warnings)、image_keys的测试。fixed #861
🤖 Generated with Claude Code