Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: binary MIME-Version: 1.0 X-Mailer: MIME-tools 5.411 (Entity 5.404) X-RT-Original-Encoding: iso-8859-1 Content-Length: 4279 From willian@ubsw.com Wed Jul 3 17:27:41 2002 Received: from pacific-carrier-annex.mit.edu (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.7.21.83]) by rt-11.mit.edu (8.9.3/8.9.3) with ESMTP id RAA09259 for ; Wed, 3 Jul 2002 17:27:40 -0400 (EDT) Received: from gate.stm.swissbank.com (gate.stm.ubswarburg.com [151.191.1.10]) by pacific-carrier-annex.mit.edu (8.9.2/8.9.2) with ESMTP id RAA14877 for ; Wed, 3 Jul 2002 17:27:39 -0400 (EDT) Received: (from smap@localhost) by gate.stm.swissbank.com (8.8.8/8.8.8) id RAA27651 for ; Wed, 3 Jul 2002 17:27:38 -0400 (EDT) Received: from (twelve.ubswarburg.com [192.168.0.6]) by gate via smap (V2.0) id xmaa27585; Wed, 3 Jul 2002 17:27:22 -0400 Received: from sm0p9035pos.stm.swissbank.com (virscan3 [192.168.0.6]) by virscan3.swissbank.com (8.8.8/8.8.8) with ESMTP id RAA26520 for ; Wed, 3 Jul 2002 17:25:05 -0400 (EDT) Received: from sm0d1989cmp.stm.swissbank.com (sm0d1989cmp.stm.swissbank.com [151.191.119.89]) by sm0p9035pos.stm.swissbank.com (8.8.8/8.8.8) with ESMTP id RAA07820; Wed, 3 Jul 2002 17:26:47 -0400 (EDT) Received: (willian@localhost) by sm0d1989cmp.stm.swissbank.com (8.8.8+Sun/8.6.12) id RAA11556; Wed, 3 Jul 2002 17:26:47 -0400 (EDT) Message-Id: <200207032126.RAA11556@sm0d1989cmp.stm.swissbank.com> Date: Wed, 3 Jul 2002 17:26:47 -0400 (EDT) From: Nicolas.Williams@ubsw.com Reply-To: Nicolas.Williams@ubsw.com To: krb5-bugs@mit.edu Cc: Nicolas.Williams@ubsw.com, Jason.Prondak@ubsw.com Subject: Aname_to_lname RULEs parsing bugs X-Send-Pr-Version: 3.99 >Number: 1132 >Category: krb5-libs >Synopsis: Aname_to_lname RULEs parsing bugs >Confidential: no >Severity: non-critical >Priority: medium >Responsible: krb5-unassigned >State: open >Class: sw-bug >Submitter-Id: unknown >Arrival-Date: Wed Jul 3 17:28:01 EDT 2002 >Last-Modified: >Originator: Nicolas Williams >Organization: -- >Release: krb5-1.2.2 >Environment: >Description: The code that parse aname_to_lname rules naively uses strchr() to find matching end-of-regexp characters, thereby making it impossible to use those characters in aname2lname rules. Specifically, one cannot use sub-expressions in the first regexp of an aname2lname rule, though regcomp() is called with the REG_EXTENDED flag, indicating the desire to support sub-expressions and other regexp extensions. Less importantly, rules cannot match ')' for the same reason. Also, one cannot match '/' in the regexp portion of the transformation part of the rule. Register substitutions in the replacement portion of the tranformation portion of the rule would be nice (e.g., "s/^\(.*\);.*$/\1/"). >How-To-Repeat: Sample rules that fail: - RULE:[2:$1;$2](^.*;(admin|root)$)s/;.*$// (fails due to the ')' in the first regexp) - RULE:[2:$1/$2](^.*/admin$)s/\/.*$// (fails due to the '/' in the second regexp) >Fix: The use of strchr() in these expressions, "strchr(startp, ')')" and "strchr(&cp[2], '/')", in lib/krb5/os/an_to_ln.c should be replaced with a function or expression which allows the first regexp to contain balanced parenthesis and which ignores backslash-escaped '/' in the second regexp. Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. >Audit-Trail: >Unformatted: