Issue 665 - a typo in servers/slapd/sasl.c
Summary: a typo in servers/slapd/sasl.c
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-08-15 21:10 UTC by mei@isi.edu
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kurt Zeilenga 2000-08-15 18:37:35 UTC
changed notes
changed state Open to Closed
moved from Incoming to Development
Comment 1 mei@isi.edu 2000-08-15 21:10:57 UTC
Full_Name: mei-hui su
Version: openldap 2.0 latest
OS: solaris 2.7
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (128.9.64.206)


Hi,

 is this a typo ? around line #470   

    if( username == NULL || (
            !strncasecmp( username, "anonymous", sizeof("anonyous")-1 ) &&
<<---
            ( ( username[sizeof("anonymous")] == '\0' ) ||
              ( username[sizeof("anonymous")] == '@' ) ) ) )
    {



mei


Comment 2 Kurt Zeilenga 2000-08-15 21:45:12 UTC
Fixed multiple typos, please test, thanks.

At 09:10 PM 8/15/00 +0000, mei@isi.edu wrote:
>Full_Name: mei-hui su
>Version: openldap 2.0 latest
>OS: solaris 2.7
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (128.9.64.206)
>
>
>Hi,
>
> is this a typo ? around line #470   
>
>    if( username == NULL || (
>            !strncasecmp( username, "anonymous", sizeof("anonyous")-1 ) &&
><<---
>            ( ( username[sizeof("anonymous")] == '\0' ) ||
>              ( username[sizeof("anonymous")] == '@' ) ) ) )
>    {
>
>
>
>mei

Comment 3 Villy Kruse 2000-08-16 06:55:36 UTC
On Tue, 15 Aug 2000 mei@isi.edu wrote:

> Date: Tue, 15 Aug 2000 21:10:59 GMT
> From: mei@isi.edu
> To: openldap-its@OpenLDAP.org
> Subject: a typo in servers/slapd/sasl.c  (ITS#665)
> 
> Full_Name: mei-hui su
> Version: openldap 2.0 latest
> OS: solaris 2.7
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (128.9.64.206)
> 
> 
> Hi,
> 
>  is this a typo ? around line #470   
> 
>     if( username == NULL || (
>             !strncasecmp( username, "anonymous", sizeof("anonyous")-1 ) &&
> <<---
>             ( ( username[sizeof("anonymous")] == '\0' ) ||
>               ( username[sizeof("anonymous")] == '@' ) ) ) )
>     {
> 
> 
> 
> mei
> 

As sizeof("anonymous") == 10 then you need to subtract one also in the
following two lines when used as an index to the end of the string.

             ( ( username[sizeof("anonymous")-1] == '\0' ) ||
               ( username[sizeof("anonymous")-1] == '@' ) ) ) )


The '@' or the trailing '\0' is expected at string position 9.


-- 
Villy

Comment 4 OpenLDAP project 2014-08-01 21:05:27 UTC
fixed.