Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

設定保存時におけるpeercast.iniの権限が変わり、パスワードがゲストユーザに漏れてしまう問題 #110

Open
meto4d opened this issue Dec 4, 2021 · 0 comments

Comments

@meto4d
Copy link
Contributor

meto4d commented Dec 4, 2021

設定保存時、参照しているpeercast.iniの権限が維持されず、peercastを実行しているUID:GIDの644権限に変更されてしまうようです。

例:peercastユーザ(peercast:peercast)で実行しているpeercastと、peercast:peercast-grpでファイルモード460のpeercast.iniが、設定保存により上書きされ、guestユーザからpasswordが見えます

~$ ls -l .config/peercast/peercast.ini
-r--rw---- 1 peercast peercast-grp 1648 Nov 23 23:53 .config/peercast/peercast.ini
~$ id
uid=7144(peercast) gid=7144(peercast) groups=7144(peercast),7140(peercast-grp)
→このユーザでpeercast実行
~$ ps -ae -o user,group,comm
USER     GROUP    COMMAND
peercast peercast peercast

→WebUIから設定保存後
~$ ls -l .config/peercast/peercast.ini
-rw-r--r-- 1 peercast peercast 1836 Dec  4 05:20 .config/peercast/peercast.ini

ServMgr::saveSettings()で作成した一時設定ファイルをrenameにより利用するため、ファイル権限が書き換わってしまうのだと思います。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant