The Samba-Bugzilla – Attachment 1589 Details for
Bug 3156
Strange bug occuring due to usage of a username map and long printer names:
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
too much in the last patch. This is only the necessary changes
look (text/plain), 2.15 KB, created by
Gerald (Jerry) Carter (dead mail address)
on 2005-11-22 08:50:47 UTC
(
hide
)
Description:
too much in the last patch. This is only the necessary changes
Filename:
MIME Type:
Creator:
Gerald (Jerry) Carter (dead mail address)
Created:
2005-11-22 08:50:47 UTC
Size:
2.15 KB
patch
obsolete
>Index: registry/reg_printing.c >=================================================================== >--- registry/reg_printing.c (revision 11859) >+++ registry/reg_printing.c (working copy) >@@ -227,7 +227,16 @@ > > reg_split_path( printers_key, &printername, &printerdatakey ); > >- if ( find_service(printername) == -1 >+ /* validate the printer name */ >+ >+ for (snum=0; snum<n_services; snum++) { >+ if ( !lp_snum_ok(snum) || !lp_print_ok(snum) ) >+ continue; >+ if (strequal( lp_servicename(snum), printername ) ) >+ break; >+ } >+ >+ if ( snum>=n_services > || !W_ERROR_IS_OK( get_a_printer(NULL, &printer, 2, printername) ) ) > { > return -1; >Index: rpc_server/srv_spoolss_nt.c >=================================================================== >--- rpc_server/srv_spoolss_nt.c (revision 11859) >+++ rpc_server/srv_spoolss_nt.c (working copy) >@@ -479,29 +479,30 @@ > DEBUGADD(5, ("searching for [%s]\n", aprinter )); > > /* Search all sharenames first as this is easier than pulling >- the printer_info_2 off of disk */ >+ the printer_info_2 off of disk. Don't use find_service() since >+ that calls out to map_username() */ > >- snum = find_service(aprinter); >- >- if ( lp_snum_ok(snum) && lp_print_ok(snum) ) { >- found = True; >- fstrcpy( sname, aprinter ); >- } >- > /* do another loop to look for printernames */ > > for (snum=0; !found && snum<n_services; snum++) { > >- /* no point in checking if this is not a printer or >- we aren't allowing printername != sharename */ >+ /* no point going on if this is not a printer */ > >- if ( !(lp_snum_ok(snum) >- && lp_print_ok(snum) >- && !lp_force_printername(snum)) ) >- { >+ if ( !(lp_snum_ok(snum) && lp_print_ok(snum)) ) > continue; >+ >+ fstrcpy(sname, lp_servicename(snum)); >+ if ( strequal( aprinter, sname ) ) { >+ found = True; >+ break; > } >+ >+ /* no point looking up the printer object if >+ we aren't allowing printername != sharename */ > >+ if ( lp_force_printername(snum) ) >+ continue; >+ > fstrcpy(sname, lp_servicename(snum)); > > printer = NULL; >@@ -524,6 +525,7 @@ > > if ( strequal(printername, aprinter) ) { > found = True; >+ break; > } > > DEBUGADD(10, ("printername: %s\n", printername));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3156
:
1588
| 1589