# mattrib -X A:tmp_dos_test
A
# mattrib +r A:tmp_dos_test
# mattrib -X A:tmp_dos_test
A
# mattrib -a A:tmp_dos_test
# mattrib -X A:tmp_dos_test
A
# mattrib +h A:tmp_dos_test
# mattrib -X A:tmp_dos_test
A
Hi lutianxiong, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Storage, and any of the maintainers: @liuzhiqiang , @linfeilong835 , @louhongxiang , @zero , @swf504
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
定位及问题原因:
gdb跟踪mattrib +r tmp_dos_test以及mattrib -X tmp_dos_test流程。
跟踪发现函数attrib_file中的root目录判断逻辑有误。
此处isRootEntry(entry)判断错误,应该是非root目录时进入设置属性流程。
进而导致mattrib设置文件属性时命令失效。
修改及验证
打入补丁
再次测试
重新运行生效。
补丁已推送社区
https://lists.gnu.org/archive/html/info-mtools/2023-03/msg00000.html
影响分析:
1、功能影响:mattrib全部的设置属性的命令均会失效,查询不受影响。
2、影响范围:走读mtools-4.0.40及mtools-4.0.35代码均无此问题。仅mtools-4.0.42版本存在。
登录 后才可以发表评论