[Top][All Lists]

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

Re: Idea: use menu hook to implement the savedefault command

From: Robert Millan
Subject: Re: Idea: use menu hook to implement the savedefault command
Date: Tue, 12 Aug 2008 12:15:21 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Tue, Aug 12, 2008 at 05:38:16PM +0800, Bean wrote:
> On Tue, Aug 12, 2008 at 4:52 PM, Robert Millan <address@hidden> wrote:
> > Notice there's already an implementation of a lock command:
> >
> >
> >
> > which, I think, even without password it would satisfy most of the users who
> > want lock/password.  I recommend you read that thread before venturing into
> > implement it (Okuji didn't like my initial proposal, and I run out of time
> > to find/implement another approach).
> Hi,
> I notice an issue with that implementation. For example, if
> menu_lock=1, how do you unlock it ? Remember that "Unlock the menu" is
> an menu item as well, so you can't get to it in the first place,
> unless you also specify text of menu somewhere, or use another
> variable, for example:
> set menu_lock=1
> set menu_unlock_menu=Unlock the menu
> Besides, we might need to fine tune auth with scripting, like
> protecting only some of the commands.

My idea was to implement unlock in scripting.  So you could do something like:

menuentry unlock {
        echo Password:
        read user_pass
        if [ $user_pass = foo ] ; then
                unset menu_lock

but Okuji had some objections to this (see the thread I pasted)

Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."

reply via email to

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