Ignore:
Timestamp:
Jun 29, 2011, 7:36:41 AM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Samba 3.5: Update vendor to version 3.5.6

Location:
vendor/current/source3/rpc_server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/rpc_server/srv_pipe.c

    r414 r587  
    11851185
    11861186        /* parse out the OIDs and the first sec blob */
    1187         if (!parse_negTokenTarg(blob, OIDs, &secblob)) {
     1187        if (!parse_negTokenTarg(blob, OIDs, &secblob) ||
     1188                        OIDs[0] == NULL) {
    11881189                DEBUG(0,("pipe_spnego_auth_bind_negotiate: Failed to parse the security blob.\n"));
    11891190                goto err;
  • vendor/current/source3/rpc_server/srv_spoolss_nt.c

    r478 r587  
    433433        WERROR result;
    434434
     435        /*
     436         * Hopefully nobody names his printers like this. Maybe \ or ,
     437         * are illegal in printer names even?
     438         */
     439        const char printer_not_found[] = "Printer \\, !@#$%^&*( not found";
     440        char *cache_key;
     441        char *tmp;
     442
    435443        DEBUG(4,("Setting printer name=%s (len=%lu)\n", handlename,
    436444                (unsigned long)strlen(handlename)));
     
    475483        }
    476484
     485        /*
     486         * With hundreds of printers, the "for" loop iterating all
     487         * shares can be quite expensive, as it is done on every
     488         * OpenPrinter. The loop maps "aprinter" to "sname", the
     489         * result of which we cache in gencache.
     490         */
     491
     492        cache_key = talloc_asprintf(talloc_tos(), "PRINTERNAME/%s",
     493                                    aprinter);
     494        if ((cache_key != NULL) && gencache_get(cache_key, &tmp, NULL)) {
     495
     496                found = (strcmp(tmp, printer_not_found) != 0);
     497                if (!found) {
     498                        DEBUG(4, ("Printer %s not found\n", aprinter));
     499                        SAFE_FREE(tmp);
     500                        return false;
     501                }
     502                fstrcpy(sname, tmp);
     503                SAFE_FREE(tmp);
     504        }
     505
    477506        /* Search all sharenames first as this is easier than pulling
    478507           the printer_info_2 off of disk. Don't use find_service() since
     
    540569
    541570        if ( !found ) {
     571                if (cache_key != NULL) {
     572                        gencache_set(cache_key, printer_not_found,
     573                                     time(NULL)+300);
     574                        TALLOC_FREE(cache_key);
     575                }
    542576                DEBUGADD(4,("Printer not found\n"));
    543577                return false;
     578        }
     579
     580        if (cache_key != NULL) {
     581                gencache_set(cache_key, sname, time(NULL)+300);
     582                TALLOC_FREE(cache_key);
    544583        }
    545584
     
    16461685                            !token_contains_name_in_list(
    16471686                                    uidtoname(p->server_info->utok.uid),
    1648                                     NULL, NULL,
     1687                                    pdb_get_domain(p->server_info->sam_account),
     1688                                    NULL,
    16491689                                    p->server_info->ptok,
    16501690                                    lp_printer_admin(snum))) {
     
    19421982                && !user_has_privileges(p->server_info->ptok, &se_printop )
    19431983                && !token_contains_name_in_list(
    1944                         uidtoname(p->server_info->utok.uid), NULL,
    1945                         NULL, p->server_info->ptok,
     1984                        uidtoname(p->server_info->utok.uid),
     1985                        pdb_get_domain(p->server_info->sam_account),
     1986                        NULL,
     1987                        p->server_info->ptok,
    19461988                        lp_printer_admin(-1)) )
    19471989        {
     
    20412083                && !user_has_privileges(p->server_info->ptok, &se_printop )
    20422084                && !token_contains_name_in_list(
    2043                         uidtoname(p->server_info->utok.uid), NULL, NULL,
     2085                        uidtoname(p->server_info->utok.uid),
     2086                        pdb_get_domain(p->server_info->sam_account),
     2087                        NULL,
    20442088                        p->server_info->ptok, lp_printer_admin(-1)) )
    20452089        {
     
    78467890             !user_has_privileges(p->server_info->ptok, &se_printop) &&
    78477891             !token_contains_name_in_list(uidtoname(p->server_info->utok.uid),
    7848                                           NULL, NULL,
     7892                                          pdb_get_domain(p->server_info->sam_account),
     7893                                          NULL,
    78497894                                          p->server_info->ptok,
    78507895                                          lp_printer_admin(snum))) {
     
    79277972             !user_has_privileges(p->server_info->ptok, &se_printop) &&
    79287973             !token_contains_name_in_list(uidtoname(p->server_info->utok.uid),
    7929                                           NULL, NULL,
     7974                                          pdb_get_domain(p->server_info->sam_account),
     7975                                          NULL,
    79307976                                          p->server_info->ptok,
    79317977                                          lp_printer_admin(snum))) {
     
    80108056             !user_has_privileges(p->server_info->ptok, &se_printop) &&
    80118057             !token_contains_name_in_list(uidtoname(p->server_info->utok.uid),
    8012                                           NULL, NULL,
     8058                                          pdb_get_domain(p->server_info->sam_account),
     8059                                          NULL,
    80138060                                          p->server_info->ptok,
    80148061                                          lp_printer_admin(snum))) {
  • vendor/current/source3/rpc_server/srv_winreg_nt.c

    r478 r587  
    221221        prs_struct    prs_hkpd;
    222222
    223         uint8_t *outbuf;
    224         uint32_t outbuf_size;
     223        uint8_t *outbuf = NULL;
     224        uint32_t outbuf_size = 0;
    225225
    226226        DATA_BLOB val_blob;
Note: See TracChangeset for help on using the changeset viewer.