You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2000/11/02 05:08:28 UTC

Netware 1.3.15 canonical names

Brad (or other Netware Users),

  I was reviewing the state of things

== snip == src/os/netware/os.c ==

char *bslash2slash(char* str)
{
    int i, len = strlen(str);    
  
    for (i=0; i<len; i++) {
        if (str[i] == '\\') {
            str[i] = '/';
            break;
        }
    }
    return str;
}

void init_name_space()
{
    UnAugmentAsterisk(TRUE);
    SetCurrentNameSpace(NW_NS_LONG);
    SetTargetNameSpace(NW_NS_LONG);
}

/*  Perform complete canonicalization.  On NetWare we are just
	lower casing the file name so that the comparisons will match.
	NetWare assumes that all physical paths are fully qualified.  
	Each file path must include a volume name.
 */
char *ap_os_canonical_filename(pool *pPool, const char *szFile)
{
    char *pNewName;
    
    pNewName = ap_pstrdup(pPool, szFile);
    strlwr(pNewName);
    return pNewName;
}

== end snip ==

Don't you mean to call bslash2slash in ap_os_canonical_filename to
assure that the path is clean when comparing for security?