简体   繁体   English

在Perl中编辑linux功能

[英]Edit linux capabilities in Perl

In a C program, you can edit your capabilities with cap_set_proc from libcap . 在C程序中,您可以使用libcap cap_set_proc编辑您的功能。 How can I achieve the same in a Perl program? 如何在Perl程序中实现相同的功能?

Linux::Prctl may meet your needs. Linux :: Prctl可能满足您的需求。

If not, you can use syscall() and try to do it the hard way . 如果没有,你可以使用系统调用()并尝试以艰难的方式去做

If that's unpalatable, too (and I would find it so), I'm sure CPAN would welcome you to contribute Linux::CapNG bindings... 如果那也不好吃(我会发现它),我相信CPAN会欢迎你贡献Linux :: CapNG绑定......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM