TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Things You Don’t Know About User IDs That Will Destroy You

69 点作者 ice799大约 16 年前

3 条评论

jrockway大约 16 年前
This blog post shows an interesting difference between the Perl community and the Ruby community. The Ruby community lives to write long blog posts about why you are writing code wrong. The Perl community just makes a library everyone can use to avoid getting things wrong in the first place.<p>(<a href="http://search.cpan.org/~tlbdk/Privileges-Drop-1.00/lib/Privileges/Drop.pm" rel="nofollow">http://search.cpan.org/~tlbdk/Privileges-Drop-1.00/lib/Privi...</a>)
评论 #560090 未加载
评论 #560191 未加载
评论 #560377 未加载
评论 #560137 未加载
评论 #560193 未加载
tptacek大约 16 年前
Another way to look at this: if you're typing "setreuid" into your code, you're doing it wrong. Most networked Ruby programs don't need to run with superuser creds in the first place. Factor the need out of your code.<p>The threat model in this post is a bit dated, too. The EUID is insecure if (paraphrase) "you can execute arbitrary code in the process, because you could just execute setuid()". That's true, but it neglects the fact that if I can run arbitrary code in your process, you're fucked anyways:<p>* Localhost nobody-&#62;root is a speed bump on most Linux deployments.<p>* If your app works as "nobody", so does an attacker with "nobody" creds.<p>* "Nobody" has network access, can talk directly to your database, and to every insecure box in your data center.
Hexstream大约 16 年前
Is the complexity of the *nix IDs completely warranted or can it be mostly attributed to historical precedents? Would there be a way to significantly simplify it without really reducing flexibility (I'm not necessarily looking for a backwards-compatible way)?
评论 #560253 未加载