Can't get argv from bprm_check_security: is the documentation incorrect ?
by 0xCAFE from LinuxQuestions.org on (#5DRV9)
Hi everybody,
I'm facing an issue and I don't know whether the issue comes from the documentation or because I missed something.
Indeed, according to Linux Kernel's doc:
Quote:
However, the value of argv and envp (e.g. bprm->mm->arg_start) are actually NULL at this point. This is due to the fact these values are setup in setup_arg_pages which is called after the hook. Additionnally at this point of time current still points to the old thread and not the new one, thus I cannot get the argument this way either
So my question is: Is the documentation incorrect or is there an alternate way to reliably get the arguments at this point?
Tell me if you need further informations :)
Thank you for your help!


I'm facing an issue and I don't know whether the issue comes from the documentation or because I missed something.
Indeed, according to Linux Kernel's doc:
Quote:
bprm_check_security [...] The argv list and envp list are reliably available in bprm. [...] |
So my question is: Is the documentation incorrect or is there an alternate way to reliably get the arguments at this point?
Tell me if you need further informations :)
Thank you for your help!