On 10/15/2009 10:12 PM, Michael Tautschnig wrote: >> On 30.09.2009 09:02, Juergen Kahnert wrote: >>> Hi, >>> >>> On Wed, Sep 30, 2009 at 03:06:41AM +0200, Darshaka Pathirana wrote: >>>>>> ainsl -a $target/etc/sudoers "%adm ALL = NOPASSWD: /bin/su -[mp]" >>>> Any help greatly appreciated. Thanks! >>> try this as a quick workaround: >>> >>> ainsl -a $target/etc/sudoers '%adm ALL = NOPASSWD: /bin/su -[mp]' >>> '^%adm ALL = NOPASSWD: /bin/su -.mp.$' >> Thx very much. Figured that out a bit later (but was to lazy to post >> it here). >> >> Nevertheless the question is: is it a mistake on my side? >> > > I don't think so, I think it's a weakness in ainsl. And the \[ \] probably > doesn't work either because the shell will strip off the \, you'll need > something like \\[ or even \\\[. > > Thomas, shouldn't ainsl not escape anything while matching and instead use \Q > and \E in the match operation to disable regexp specials? Of course, it should > take care of ^ and $ and change that to ^\Q$line\E$.
Any progress on this? Greetings, - Darsaha
