Ignore:
Timestamp:
Jul 2, 2011, 4:01:14 PM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Samba 3.5: Update vendor to version 3.5.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/lib/access.c

    r414 r597  
    179179{
    180180        const char **client = (const char **)item;
     181        const char *tok_addr = tok;
     182        const char *cli_addr = client[ADDR_INDEX];
     183
     184        /*
     185         * tok and client[ADDR_INDEX] can be an IPv4 mapped to IPv6,
     186         * we try and match the IPv4 part of address only.
     187         * Bug #5311 and #7383.
     188         */
     189
     190        if (strnequal(tok_addr, "::ffff:",7)) {
     191                tok_addr += 7;
     192        }
     193
     194        if (strnequal(cli_addr,"::ffff:",7)) {
     195                cli_addr += 7;
     196        }
    181197
    182198        /*
     
    185201         */
    186202
    187         if (string_match(tok, client[ADDR_INDEX])) {
    188                 return true;
    189         }
    190 
    191         if (strnequal(client[ADDR_INDEX],"::ffff:",7) &&
    192                         !strnequal(tok, "::ffff:",7)) {
    193                 /* client[ADDR_INDEX] is an IPv4 mapped to IPv6, but
    194                  * the list item is not. Try and match the IPv4 part of
    195                  * address only. This will happen a lot on IPv6 enabled
    196                  * systems with IPv4 allow/deny lists in smb.conf.
    197                  * Bug #5311. JRA.
    198                  */
    199                 if (string_match(tok, (client[ADDR_INDEX])+7)) {
    200                         return true;
    201                 }
     203        if (string_match(tok_addr, cli_addr)) {
     204                return true;
    202205        }
    203206
Note: See TracChangeset for help on using the changeset viewer.