nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] RFC: should restricted mode disallow --locking?


From: David Ramsey
Subject: Re: [Nano-devel] RFC: should restricted mode disallow --locking?
Date: Sat, 24 Mar 2018 19:35:08 -0500

Benno Schulenberg:
> In restricted mode (-R, --restricted), nano goes to great lengths to
> prevent the user from opening or accessing any file that was not given
> on the command line: nanorc files are not read, backup files are not
> made, history files are not read nor written, the file browser and
> spell checking and the linter are disabled...
>
> *But*, the option -G (--locking) is still available, so nano will read
> and/or write a lock file for each file given on the command line.
>
> Should this be disabled too?  Or is file locking somehow useful when
> in restricted mode?

I think locking is a special case that should be allowed, since locking
is useful in general to avoid problems with multiple instances of nano
(even restricted nano) working on the same file simultaneously.  nano
still won't be able to open any files for editing that weren't
originally specified on the command line, regardless.

More importantly, however, the lockfiles are deliberately modeled after
those of vim.  I've tested vim 8.0.1601, and it creates lockfiles even
when invoked in restricted mode.  So, if --locking is specified on the
command line of rnano, it should do the same.  (If you allow the user
control of the command line, there's not much point to using restricted
mode, so whatever invokes rnano in that case will have to specify
--locking.)



reply via email to

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