[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bacula-devel
Subject:    Re: [Bacula-devel] Suggestion:  The quoting problem revisited,
From:       Kern Sibbald <kern () sibbald ! com>
Date:       2009-05-13 19:32:50
Message-ID: 200905132132.50371.kern () sibbald ! com
[Download RAW message or body]

Hello Phil,

I don't think that using base64 will resolve any of the problems.  They are 
related to the fact that the command line is scanned twice if it is passed to 
a Client.

The solution, in my opinion, is to modify how values are passed from the Dir 
to the FD to simplify the scanning.

We are waiting for the results of the current user voting to decide what *we* 
will work on next.  However, if you feel you can resolve this problem and 
send us a patch, then please do so, but to ensure acceptance of any proposed 
patch, please discuss the details of any implementation and be sure to read 
the Developer's guide that give valuable information on what we accept and do 
not accept.

Best regards,

Kern

On Wednesday 13 May 2009 17:56:37 Phil Stracchino wrote:
> In regard to the ClientRunBeforeJob problem, Noah Utecht just pointed
> out to me the Windows %PROGRAMFILES% environment variable.  While it
> works around the problem in this case, it does not solve the larger
> general problem, but while replying to him I thought about a similar
> problem I solved in a scheduling tool I wrote myself which needs to pass
> command lines down a chain of programs, including at one point
> generating at(1) jobs.
>
> Anyway, it occurred to me that one solution I considered in that case
> (and may still implement as a retrofit, actually) may be generally
> applicable to all of the cases in which Bacula uses a scripted command
> as a RunBeforeJob/RunScript/RunAfterJob etc.  The key point here is that
> the script command only needs to be human-readable in the config file.
> Its internal storage form from then on until the script is called by
> whichever program finally issues the command, and particularly while
> being passed from one component to the next, is largely irrelevant.
>
> So, why not have the Director Base64 encode script directives as soon as
> it reads them from the config file?  That base64-encoded string can be
> passed cleanly from component to component with no escaping or quoting
> issues, then decoded back into a command line only when about to be
> issued by whatever daemon is going to emit the script call.  This should
> eliminate almost all quoting/escaping issues involved in running scripts
> from Bacula.
>
>
> Thoughts?



------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic