[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: |
Bean |
Subject: |
Re: Idea: use menu hook to implement the savedefault command |
Date: |
Tue, 12 Aug 2008 18:38:08 +0800 |
On Tue, Aug 12, 2008 at 6:15 PM, Robert Millan <address@hidden> wrote:
> 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:
>> >
>> > http://www.mail-archive.com/address@hidden/msg05350.html
>> >
>> > 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
> fi
> }
>
> but Okuji had some objections to this (see the thread I pasted)
Hi,
I know that, but isn't "unlock" another menu item which would normally
be locked by menu_lock ? You can hard coded it to ignore the "unlock"
menu, but what if user want to use another name.
--
Bean
- Idea: use menu hook to implement the savedefault command, Bean, 2008/08/11
- Idea: use menu hook to implement the savedefault command, Bean, 2008/08/11
- Re: Idea: use menu hook to implement the savedefault command, Robert Millan, 2008/08/11
- Re: Idea: use menu hook to implement the savedefault command, Bean, 2008/08/11
- Re: Idea: use menu hook to implement the savedefault command, Robert Millan, 2008/08/12
- Re: Idea: use menu hook to implement the savedefault command, Bean, 2008/08/12
- Re: Idea: use menu hook to implement the savedefault command, Robert Millan, 2008/08/12
- Re: Idea: use menu hook to implement the savedefault command,
Bean <=
- Re: Idea: use menu hook to implement the savedefault command, Robert Millan, 2008/08/12
- Re: Idea: use menu hook to implement the savedefault command, Bean, 2008/08/12
Re: Idea: use menu hook to implement the savedefault command, Marco Gerards, 2008/08/13