Changeset 587 for vendor/current/source3/rpc_server
- Timestamp:
- Jun 29, 2011, 7:36:41 AM (14 years ago)
- Location:
- vendor/current/source3/rpc_server
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/rpc_server/srv_pipe.c
r414 r587 1185 1185 1186 1186 /* 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) { 1188 1189 DEBUG(0,("pipe_spnego_auth_bind_negotiate: Failed to parse the security blob.\n")); 1189 1190 goto err; -
vendor/current/source3/rpc_server/srv_spoolss_nt.c
r478 r587 433 433 WERROR result; 434 434 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 435 443 DEBUG(4,("Setting printer name=%s (len=%lu)\n", handlename, 436 444 (unsigned long)strlen(handlename))); … … 475 483 } 476 484 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 477 506 /* Search all sharenames first as this is easier than pulling 478 507 the printer_info_2 off of disk. Don't use find_service() since … … 540 569 541 570 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 } 542 576 DEBUGADD(4,("Printer not found\n")); 543 577 return false; 578 } 579 580 if (cache_key != NULL) { 581 gencache_set(cache_key, sname, time(NULL)+300); 582 TALLOC_FREE(cache_key); 544 583 } 545 584 … … 1646 1685 !token_contains_name_in_list( 1647 1686 uidtoname(p->server_info->utok.uid), 1648 NULL, NULL, 1687 pdb_get_domain(p->server_info->sam_account), 1688 NULL, 1649 1689 p->server_info->ptok, 1650 1690 lp_printer_admin(snum))) { … … 1942 1982 && !user_has_privileges(p->server_info->ptok, &se_printop ) 1943 1983 && !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, 1946 1988 lp_printer_admin(-1)) ) 1947 1989 { … … 2041 2083 && !user_has_privileges(p->server_info->ptok, &se_printop ) 2042 2084 && !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, 2044 2088 p->server_info->ptok, lp_printer_admin(-1)) ) 2045 2089 { … … 7846 7890 !user_has_privileges(p->server_info->ptok, &se_printop) && 7847 7891 !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, 7849 7894 p->server_info->ptok, 7850 7895 lp_printer_admin(snum))) { … … 7927 7972 !user_has_privileges(p->server_info->ptok, &se_printop) && 7928 7973 !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, 7930 7976 p->server_info->ptok, 7931 7977 lp_printer_admin(snum))) { … … 8010 8056 !user_has_privileges(p->server_info->ptok, &se_printop) && 8011 8057 !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, 8013 8060 p->server_info->ptok, 8014 8061 lp_printer_admin(snum))) { -
vendor/current/source3/rpc_server/srv_winreg_nt.c
r478 r587 221 221 prs_struct prs_hkpd; 222 222 223 uint8_t *outbuf ;224 uint32_t outbuf_size ;223 uint8_t *outbuf = NULL; 224 uint32_t outbuf_size = 0; 225 225 226 226 DATA_BLOB val_blob;
Note:
See TracChangeset
for help on using the changeset viewer.