Ignore:
Timestamp:
Nov 12, 2012, 7:37:04 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: update branche to 3.5.19

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.5.x/source3/smbd/server.c

    r736 r739  
    561561        int i;
    562562        char *ports;
     563        char *tok;
     564        const char *ptr;
    563565        unsigned dns_port = 0;
    564566
     
    582584        }
    583585
     586        for (ptr = ports;
     587             next_token_talloc(talloc_tos(),&ptr, &tok, " \t,");) {
     588                unsigned port = atoi(tok);
     589
     590                if (port == 0 || port > 0xffff) {
     591                        exit_server_cleanly("Invalid port in the config or on "
     592                                            "the commandline specified!");
     593                }
     594        }
     595
    584596        if (lp_interfaces() && lp_bind_interfaces_only()) {
    585597                /* We have been given an interfaces line, and been
     
    593605                        const struct sockaddr_storage *ifss =
    594606                                        iface_n_sockaddr_storage(i);
    595                         char *tok;
    596                         const char *ptr;
    597607
    598608                        if (ifss == NULL) {
     
    606616                             next_token_talloc(talloc_tos(),&ptr, &tok, " \t,");) {
    607617                                unsigned port = atoi(tok);
    608                                 if (port == 0 || port > 0xffff) {
    609                                         continue;
    610                                 }
    611618
    612619                                /* Keep the first port for mDNS service
     
    626633                   from anywhere. */
    627634
    628                 char *tok;
    629                 const char *ptr;
    630635                const char *sock_addr = lp_socket_address();
    631636                char *sock_tok;
     
    645650                        for (ptr=ports; next_token_talloc(talloc_tos(), &ptr, &tok, " \t,"); ) {
    646651                                struct sockaddr_storage ss;
    647 
    648652                                unsigned port = atoi(tok);
    649                                 if (port == 0 || port > 0xffff) {
    650                                         continue;
    651                                 }
    652653
    653654                                /* Keep the first port for mDNS service
Note: See TracChangeset for help on using the changeset viewer.