telegram_5485519628
@telegram_5485519628:nichi.co
49 messages · Page 1 of 1
telegram_5485519628
bwrap会自动建立不存在挂载点吧?
telegram_5485519628
Richard Luo不是被禁言了吗?怎么又出来了。是禁言到期了吗?https://t.me/archlinuxcn_offtopic/8101653
telegram_5485519628
可能外面得用systemd的ProtectProc=ptraceable包一层?
telegram_5485519628
突然想到,bwrap是不是不支持使用procfs的hidepid参数……要是没有pidns,他会把host的/proc直接bind进去
telegram_5485519628
* 不使用pidns的话有systemd兜底倒是确实也不需要……
telegram_5485519628
不使用pidns的话有系统init兜底确实也不怎么需要……
telegram_5485519628
但是这种情况主程序真的不会回收吗?很多程序不会调用waitpid(-1)?只会调用waitpid(child_pid)?
telegram_5485519628
哦。使用了pidns的话,主程序run as pid1,孙进程应该会被reparent到主程序而不是systemd --user…
telegram_5485519628
外面还有systemd --user啊
telegram_5485519628
哦,不过主进程没退出systemd是不是就不wait了……但是我觉得这应该是程序自己的问题。
telegram_5485519628
多数主程序应该会wait子进程的吧,可能孙进程会变僵尸?那样的话也会被systemd收养吧。
telegram_5485519628
还没研究这个,我猜没啥问题,pid1只是要负责wait子进程,但是沙盒外面还有systemd --user的,本来就打算主进程退出后让这些东西一起去死的。
嗯,只是猜测。
telegram_5485519628
而且开启pidns后会fork是expected,毕竟Linux内核不允许进程更改自己的pidns。
telegram_5485519628
这个倒是明确可以用--as-pid-1关掉吧
telegram_5485519628
嘛,不过某些程序确实是可以杀死bwrap的,bash不行,dolphin可以,我估计还是什么controlling terminal之类的玩意在发信号。
telegram_5485519628
强迫症呗,不想要多余的进程,想要一个in process沙盒。
其实留着它的json-status-fd获取状态汇报给systemd用也挺好的。
telegram_5485519628
* 内核有相关文档具体描述这个行为吗?
telegram_5485519628
嗯……不太想看源码了。
探索路线太长了……
不满意portable微信创建太多cgroup且仍然创建不知用途的.config/profiles → 试图直接用systemd沙盒化程序发现xdg-dbus-proxy需要跟程序本体使用不同的运行环境 → 想起https://forum.archlinuxcn.org/t/topic/15039 → 强迫症犯了研究bwrap并试图在它启动程序后杀死bwrap并保持程序运行 → bwrap的具体行为太有意思想看但是脑袋发烧到疼了
telegram_5485519628
内核有相关文档具体这个行为吗?
telegram_5485519628
我的意思是,我觉得不管顺序如何,写了--dev-bind应该总会比只写--bind 多一些挂载点,但我测试的结果是--dev-bind写在后面会多出来,写在前面就不会多出来
telegram_5485519628
“覆盖”只是文件系统树看上去看不见之前挂载点里的东西而已吧,之前的挂载点不应该消失吧。
telegram_5485519628
但是/proc/self/mountinfo里看不见更多的挂载点啊。按理说反过来写应该会看见两个/dev吧
telegram_5485519628
* 但是反过来写不应该比单纯写`—bind / /` 多出一些 `/dev`挂载吗?还是说在先处理`—dev-bind`的时候挂载点不存在它也不创建?
telegram_5485519628
* 但是反过来写不应该比单纯写`—bind / / 多出一些/dev`挂载吗?还是说在先处理`—dev-bind`的时候挂载点不存在它也不创建?
telegram_5485519628
但是反过来写不应该比—bind / / 多出一些挂载点吗?
telegram_5485519628
哦,它是完全按参数顺序挂载的……
telegram_5485519628
[m.image] 直接截个图说一下具体复现办法好了。为什么这里面全是nodev挂载呢?
telegram_5485519628
UTF-8大概没问题?
telegram_5485519628
* 使用
bwrap --dev-bind /dev /dev --bind / / /path/to/exe
为什么会无法访问设备呢?
明明用了—dev-bind,结果看一眼/proc/self/mountinfo里面的/dev依然是nodev挂载的,为啥?
telegram_5485519628
UDP只会整个丢包不重传吧,UDP也有checksum
telegram_5485519628
略微翻了一下源代码,带着BIND_DEVICES的bind_mount调用应该也成功返回了啊?
telegram_5485519628
使用`bwrap --dev-bind /dev /dev --bind / / /path/to/exe`为什么会无法访问设备呢?明明用了—dev-bind,结果看一眼/proc/self/mountinfo里面的/dev依然是nodev挂载的,为啥?
telegram_5485519628
DSL写配置相比于直接写软件本身的配置语法会有些不舒服。
telegram_5485519628
Qt支持重连的。说实话显示不了窗口就死掉的程序行为是很不正常的。
telegram_5485519628
刚在看
https://specifications.freedesktop.org/mime-apps/latest/
我想知道各个portal impl的OpenURI是否遵守这个规范呢?
telegram_5485519628
话说微信打开文件的逻辑是什么?直接调用xdg-open吗?
telegram_5485519628
因为没有预料到要加频道啊!我只在matrix有频道和meta,tg没有啊!
telegram_5485519628
我差点气得就不想加回去了!
telegram_5485519628
主群链接给一下?
telegram_5485519628
退了
telegram_5485519628
……抱歉,听不懂。我要现在退出主群重新加入吗?
telegram_5485519628
啊,不对,meta群一天没有新用户有啥奇怪的?
telegram_5485519628
没啥问题吧
telegram_5485519628
我可以加入进来啊,我试试退出去哈
telegram_5485519628
并非一定会
telegram_5485519628
* 呃,不太对,似乎需要额外写一个非沙盒的服务了。否则ProtectHome=tmpfs会重建……
telegram_5485519628
* 呃,有点问题,>
File system namespaces are set up individually for each
process forked off by the service manager. Mounts established
in the namespace of the process created by ExecStartPre= will
hence be cleaned up automatically as soon as that process
exits and will not be available to subsequent processes forked
off for ExecStart= (and similar applies to the various other
commands configured for units).
telegram_5485519628
呃,有点问题,File system namespaces are set up individually for each
process forked off by the service manager. Mounts established
in the namespace of the process created by ExecStartPre= will
hence be cleaned up automatically as soon as that process
exits and will not be available to subsequent processes forked
off for ExecStart= (and similar applies to the various other
commands configured for units).
telegram_5485519628
选软件只取决于用途啦
Page 1 / 1