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

如果修改源代码使得root用户可以执行,会有安全问题吗 #19

Open
YuTaoFighting opened this issue Oct 22, 2020 · 1 comment

Comments

@YuTaoFighting
Copy link

如果修改源代码使得root用户可以执行,会有安全问题吗

@quark-zju
Copy link
Owner

ljudge 不执行用户代码,大概不会有什么问题。lrun 会执行用户代码,不应该使用 root 来运行。如果用 root 来运行 lrun,需要使用 lrun --uid uid --gid gid 让其在执行用户代码之前切换到非特权 uid。如果使用了诸如 --uid 0 来运行用户代码,它会有额外的比如可以 mount 文件系统的特权,很可能有安全问题。

正常安装的情况下,lrun 设置有 setgid,在 lrun 用户组的用户都可以运行 lrun。如果无法运行,检查一下当前用户是否在 lrun 用户组,并且 lrun 是否有 setgid。

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

2 participants