httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Netware 1.3.15 canonical names
Date Thu, 02 Nov 2000 04:08:28 GMT
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?

Mime
View raw message