Setting cred->security field of a newly created process

noyb noybee afzalulh at gmail.com
Sun Mar 15 12:51:49 EDT 2015


How do I go about setting the cred->security field of the task_struct
of a newly created process? There is no specific condition, all it has
to do is assign the security field of the parent to the child, as soon
as it is created. I looked into the security_task_struct hook, but
apparently that doesn't contain the task_struct of the
child(obviously, since it is called before the creation to check for
permission), but also the clone_flags variable can't be used because
that doesn't contain an option for copying the cred->security field
too.

Also, when are the hooks cred_alloc_blank, cred_free, cred_prepare,
cred_commit & cred_transfer hooks called?



More information about the Kernelnewbies mailing list