<div dir="ltr"><br><br><div class="gmail_quote">On Mon, Oct 13, 2008 at 11:11 AM, David Roundy <span dir="ltr">&lt;<a href="mailto:droundy@darcs.net">droundy@darcs.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all (and Jason in particular),<br>
<br>
This is a proposed change that needs to be discussed. &nbsp;I have never<br>
cared for the --run-posthook and --run-prehook flags (and<br>
--prompt-posthook and --prompt-prehook), and would prefer to remove<br>
them.</blockquote><div><br>I think we should have --disable-posthook (or whatever it&#39;s currently named) for the same reason we have --no-test.&nbsp; If we have the disable option, perhaps we should keep --run-posthook for symmetry regardless of the default behavior?<br>
<br>Again, regardless of the default behavior, --prompt-posthook is nice for the same reason as --disable-posthook and the reason to have -i in rm as you point out.&nbsp; If I recall correctly, --prompt-posthook shows you the command before running it and alerts you to the fact that it&#39;s about to happen.&nbsp; This is particularly useful in the case where you get a new repository and you&#39;re working with it.&nbsp; I know how to change the default behavior locally, so again, I argue for this regardless of the default.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
As I mention below, I don&#39;t think they serve a valid security<br>
feature. &nbsp;If you allow a hostile user to call darcs with an arbitrary<br>
command line, that user can add both --posthook=&#39;rm -rf ~&#39; and<br>
--run-posthook at the same time. &nbsp;Ditto for hostile users who are able<br>
to modify your defaults file.</blockquote><div><br>I guess it depends on the interaction between prefs and commandline options.&nbsp; When I added this I didn&#39;t really get how a push works interms of the remote apply.&nbsp; I seem to recall thinking it would help make it possible to make a push more secure, or at least this could be used to keep it from becoming less secure.&nbsp; But, as you point out, things like &#39;darcs push&#39; cannot be secured.<br>
&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">So it isn&#39;t a possible security feature, but just a &quot;safety&quot; feature<br>

(like rm -i). &nbsp;But I&#39;m also unable to imagine a scenario where someone<br>
&quot;accidentally&quot; calls --posthook, or accidentally adds it to their<br>
defaults file. &nbsp;Which just leaves it as an annoyance, and I&#39;m annoyed<br>
by it, so I&#39;d rather just remove the feature.</blockquote><div><br>Why don&#39;t we just change the default behavior?&nbsp; I don&#39;t see why we should remove this safety feature.&nbsp; I guess if we change the default then perhaps the flag --run-posthook is unneeded, but disable and prompt still seem useful much like --no-test and rm -i.<br>
<br>Thanks,<br>Jason<br></div></div><br></div>