Patch: running external commands from wpa_supplicant

Henrik Brix Andersen brix at gentoo.org
Tue Jan 11 14:08:59 EST 2005


Hi Jouni,

I've written a preliminary patch for wpa_supplicant to allow running
external commands (ifconfig, dhcp client, distribution specific
scripts, ...) upon receiving various events.

The patch is not yet fully complete. I need advice on where to add the
hooks for auth_cmd and reauth_cmd - see the patch for more details. The
hook for startup_cmd is already in place.

The patch could be modified to use the exec family of system calls for
executing the commands instead of using system(). This would allow
running commands which are in PATH without specifying the full path to
the binary, but I don't know how exec() influences portability?

Perhaps it would be useful to have a shutdown_cmd as well? For bringing
down the interface upon shutdown of wpa_supplicant?

Let me hear what you think.

Sincerely,
Brix

Patch against current CVS HEAD attached.
-- 
Henrik Brix Andersen <brix at gentoo.org>
Gentoo Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wpa_supplicant-cmd-2005-01-11.patch
Type: text/x-patch
Size: 6311 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20050111/9a3ccf8d/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20050111/9a3ccf8d/attachment.pgp 


More information about the HostAP mailing list