execute problems
muzzol
muzzol at gmail.com
Tue Sep 19 14:07:10 UTC 2006
> man dhcp-eval
> ...
> execute(command-path, data-expr1 ... data-exprN);
>
> External command execution is made possible through exe-
> cute(); expressions. These expressions take a variable
> number of arguments, where the first is the command name
> (full path or only the name of the executable) and is fol-
> lowed by zero or more are data-expressions whose values
> will be evaluated and passed as external arguments
> (assumed to be text strings suitable for use as a
> command-line argument). It returns the numeric return
> code of the external command, or one of the following spe-
> cial values:
>
> o 125: Invalid arguments.
>
> o 126: fork() failure
>
> o 127: execvp() failure
>
> o -SIGNAL: Should the child exit due to a signal, rather
> than exiting normally with an exit status, the signal
> number multiplied by negative 1 will be returned.
>
> Execute is synchronous, and the program will block until
> the external command being run has finished. Please note
> that lengthy program execution (for example, in an "on
> commit" in dhcpd.conf) may result in bad performance and
> timeouts. Only external applications with very short exe-
> cution times are suitable for use.
>
> Passing user-supplied data to an external application
> might be dangerous. Make sure the external application
> checks input buffers for validity. Non-printable ASCII
> characters will be converted into dhcpd.conf language
> octal escapes ("777"), make sure your external command
> handles them as such.
>
> It is possible to use the execute expression in any con-
> text, not only on events. If you put it in a regular scope
> in the configuration file you will execute that command
> every time a scope is evaluated.
>
thanks for info, my version of dhcp-eval dont show this part, si i'll
recompile whith lastest build.
> What particular type of information are you interested in?
>
im insterested in giving acces to certain users depending of their
configuration. for example, if they are windows users (this is covered
in another thread), if they have some ports opened, if they have some
services activated. so it could be nice to create a script against
every client trying to get an ip and evaluate it.
regards.
--
========================
^ ^
O O
(_ _)
muzzol(a)gmail.com
========================
jabber id: muzzol(a)jabber.dk
========================
No atribueixis qualitats humanes als ordinadors.
No els hi agrada.
========================
"El gobierno español sólo habla con terroristas, homosexuales y
catalanes, a ver cuando se decide a hablar con gente normal"
Jiménez Losantos
========================
<echelon spamming>
bomb terrorism bush aznar teletubbies
</echelon spamming>
More information about the dhcp-users
mailing list