Ignore:
Timestamp:
Jan 15, 2010, 8:23:30 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 to 3.3.10 (source)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/smbd/mangle_hash.c

    r206 r370  
    433433                        /* Truncate at the '.' */
    434434                        *s1 = '\0';
     435                        /*
     436                         * DANGER WILL ROBINSON - this
     437                         * is changing a const string via
     438                         * an aliased pointer ! Remember to
     439                         * put it back once we've used it.
     440                         * JRA
     441                         */
    435442                        *s2 = '\0';
    436443                }
     
    444451                DEBUG(5,("cache_mangled_name: Stored entry %s -> %s\n", mangled_name_key, raw_name));
    445452        }
     453        /* Restore the change we made to the const string. */
     454        *s2 = '.';
    446455}
    447456
     
    614623        status = is_valid_name(name_ucs2, False, False);
    615624        SAFE_FREE(name_ucs2);
    616         return NT_STATUS_IS_OK(status);
     625        /* We return true if we *must* mangle, so if it's
     626         * a valid name (status == OK) then we must return
     627         * false. Bug #6939. */
     628        return !NT_STATUS_IS_OK(status);
    617629}
    618630
Note: See TracChangeset for help on using the changeset viewer.