Asking about execv() in os_exec()
Jouni Malinen
j
Wed Aug 5 08:45:20 PDT 2015
On Wed, Aug 05, 2015 at 11:23:40AM +0000, ??? wrote:
> <P>The os_exec() added with below patch last year, and the execv(program, argv) has been using in the os_exec() to run external programs.</P>
> <P>However, we met 'execv:Exec format error' with this change when we used '-a' option.</P>
What is the exact value you provide to the -a option as the file path?
Have you tried giving a full path (absolute path starting with '/')?
> <P>Our Wi-Fi chip vendor said the execv() is not proper function, because the first argument of execv() is 'path' , not 'filename'.</P>
> <P>And, they recommended we use execvp() or execve() instead.</P>
execv() is used here on purpose, i.e., the expectation is that absolute
path to the program to be executed is provided.
Could you please describe why there would be need to do searching of the
action script from the path (which is the main difference between
execv() and execvp())?
wpa_cli does actually use environment variables, so there might be other
justification for moving to using execve().
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list