开发者

do_execve() code in linux source code [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 7 years ago.

Improve this question

In do_execve() there is a call to prepare_bprm_creds(bprm) in line number 1396.

In prepare_bprm_creds(struct linux_binprm *bprm) function definition it calls prepare_exec_creds() in line number 1121.

Could you开发者_高级运维 please explain to me the working of prepare_bprm_creds(struct linux_binprm *bprm) (what it does).


For future reference, please cite filename and version number, not just line number. Better yet, link to a LXR listing. In any case...

prepare_bprm_creds eventually calls prepare_creds, which allocates a struct cred - this will eventually hold the security context of the new task (ie, per-thread security information). Along the way, execution also passes through prepare_exec_creds, which allocates a thread_group_cred structure, which holds some security information that is shared for all threads in a process.

Note that this only allocates memory for the structure; the new credentials are set in prepare_binprm later.


As for credentials, there is documentation at Documentation/credentials.txt.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜