Re: [BackupPC-users] Is there a reason that DumpPreUserCmd (and its analogs) are executed without a shell?

2020-06-24 Thread
I ended up using the perl embedded code approach... it gave me more flexibility. I now have a robust routine that uses DumpPreUserCmd/DumpPostUserCmd to automagically set up Window Shadow copies on remote Windows 7 machines (should presumably also work for Windows 8/10). It basically uses your c

Re: [BackupPC-users] Is there a reason that DumpPreUserCmd (and its analogs) are executed without a shell?

2020-06-24 Thread Craig Barratt via BackupPC-users
Jeff, The reason BackupPC avoids running shells for sub-commands is security, and the extra layer of argument escaping or quoting. It's easy to inadvertently have some security weakness from misconfiguration or misuse. Can you get what you need by starting the command with "/bin/bash -c"? You c

[BackupPC-users] Is there a reason that DumpPreUserCmd (and its analogs) are executed without a shell?

2020-06-24 Thread
I notice that in Lib.pm, the function 'cmdSystemOrEvalLong' specifically uses the structure 'exec {$cmd->[0]} @$cmd;' so that no shell is invoked. I know that technically it's a little faster to avoid calling the shell, but in many cases it is very useful to have at least a rudimentary shell avail