monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Key decryption for automate stdio usage Was: Re: [Monotone-devel] re


From: Timothy Brownawell
Subject: Re: Key decryption for automate stdio usage Was: Re: [Monotone-devel] review of nvm.automate_out_of_band
Date: Sat, 28 Nov 2009 15:02:34 -0600
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109)

Thomas Keller wrote:
> I'd have to test this out, but I'm sure you can give --rcfile to every
> command invocation and since this particularily extends the functional
> namespace of lua the more recent functions there should overwrite "old"
> versions, i.e.
> 
> function get_passphrase()
>       return "foo"
> end
> 
> function get_passphrase()
>       return "bar"
> end
> 
> io.write(get_passphrase())
> 
> should print "bar" to stdout, so it shouldn't be a problem.


$ for i in ?.lua; do echo "*** " $i; cat $i; done
***  i.lua
function foo()
        io.stderr:write("i\n")
end
***  x.lua
function foo()
        io.stderr:write("x\n")
end
***  y.lua
function foo()
        io.stderr:write("y\n")
end


$ { echo o6:rcfile5:x.luael3:lua3:fooe;
    echo o6:rcfile5:y.luael3:lua3:fooe; } |
  mtn -d :memory: --rcfile i.lua au stdio >/dev/null
i
i



...no, looks like --rcfile given on individual commands doesn't take. I
guess because we call app.lua.load_rcfiles() in monotone.cc but not in
the automate stdio loop, maybe this should be changed? Or maybe it
shouldn't, since with remote_stdio this could be a problem if someone
untrusted can write somewhere on the filesystem and call even
interface_version.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]