Re: [bug #13832] Cannot execute user menu command if temporary directory is in filesystem mounted with noexec option



Leonard den Ottolander wrote:
Follow-up Comment #5, bug #13832 (project mc):

Before committing this patch I'd like to see it extended in either of the
following ways first:

Too late. :) I just committed this nice, small fix.

a) Test for mount options of $MC_TMPDIR and concatenate "/bin/sh " only when
necessary.

1. That's too complicated for a quick fix.
2. Determining the mount options is highly system dependent. _I_ don't want to investigate this for all those environments that we are currently supporting.

b) Extend shell_execute(), do_execute() to pass the error generated by
my_system on failure. Execute the command plainly and in case of an error
caused by the mount options execute it once again with a concatenated shell.

Too unreliable.

c) Extend to pass error as in b). Test on init and set a parameter
(need_shell) so we don't have to do this test on every invokation of
shell_execute(). In case of failure because the mount option changed during
the session reset the parameter need_shell to new value and retry.

Too complicated.

Roland



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