The branch, master has been updated
       via  d77c45675744895b01d905f7f27ae55e64264c26 (commit)
       via  7ac1ae8d1c3bcf4d001e29fdc1ee314dcbe3df76 (commit)
      from  9966541f89b45834cdf63060202621f885bf9f5c (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit d77c45675744895b01d905f7f27ae55e64264c26
Author: Günther Deschner <[email protected]>
Date:   Mon May 4 17:25:41 2009 +0200

    s3-rpcclient: print more infolevels in printer and driver info levels.
    
    Guenther

commit 7ac1ae8d1c3bcf4d001e29fdc1ee314dcbe3df76
Author: Günther Deschner <[email protected]>
Date:   Wed May 6 10:20:52 2009 +0200

    s3-printing: fix debug statement in virtual registry layer
    (key_driver_fetch_keys).
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source3/registry/reg_backend_printing.c |    2 +-
 source3/rpcclient/cmd_spoolss.c         |  245 ++++++++++++++++++++++++++++++-
 2 files changed, 239 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/registry/reg_backend_printing.c 
b/source3/registry/reg_backend_printing.c
index 4465d2e..8c6f673 100644
--- a/source3/registry/reg_backend_printing.c
+++ b/source3/registry/reg_backend_printing.c
@@ -878,7 +878,7 @@ static int key_driver_fetch_keys( const char *key, struct 
regsubkey_ctr *subkeys
 
        /* if anything else left, just say if has no subkeys */
 
-       DEBUG(1,("key_driver_fetch_keys unhandled key [%s] (subkey == %s\n",
+       DEBUG(1,("key_driver_fetch_keys unhandled key [%s] (subkey == %s)\n",
                key, subkeypath ));
 
        return 0;
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index aefaa04..d4234b0 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -238,13 +238,46 @@ static void display_print_info3(struct 
spoolss_PrinterInfo3 *r)
 /****************************************************************************
 ****************************************************************************/
 
+static void display_print_info4(struct spoolss_PrinterInfo4 *r)
+{
+       printf("\tservername:[%s]\n", r->servername);
+       printf("\tprintername:[%s]\n", r->printername);
+       printf("\tattributes:[0x%x]\n", r->attributes);
+       printf("\n");
+}
+
+/****************************************************************************
+****************************************************************************/
+
+static void display_print_info5(struct spoolss_PrinterInfo5 *r)
+{
+       printf("\tprintername:[%s]\n", r->printername);
+       printf("\tportname:[%s]\n", r->portname);
+       printf("\tattributes:[0x%x]\n", r->attributes);
+       printf("\tdevice_not_selected_timeout:[0x%x]\n", 
r->device_not_selected_timeout);
+       printf("\ttransmission_retry_timeout:[0x%x]\n", 
r->transmission_retry_timeout);
+       printf("\n");
+}
+
+/****************************************************************************
+****************************************************************************/
+
+static void display_print_info6(struct spoolss_PrinterInfo6 *r)
+{
+       printf("\tstatus:[0x%x]\n", r->status);
+       printf("\n");
+}
+
+/****************************************************************************
+****************************************************************************/
+
 static void display_print_info7(struct spoolss_PrinterInfo7 *r)
 {
        printf("\tguid:[%s]\n", r->guid);
        printf("\taction:[0x%x]\n", r->action);
+       printf("\n");
 }
 
-
 /****************************************************************************
 ****************************************************************************/
 
@@ -306,6 +339,15 @@ static WERROR cmd_spoolss_enum_printers(struct 
rpc_pipe_client *cli,
                        case 3:
                                display_print_info3(&info[i].info3);
                                break;
+                       case 4:
+                               display_print_info4(&info[i].info4);
+                               break;
+                       case 5:
+                               display_print_info5(&info[i].info5);
+                               break;
+                       case 6:
+                               display_print_info6(&info[i].info6);
+                               break;
                        default:
                                printf("unknown info level %d\n", level);
                                goto done;
@@ -624,6 +666,15 @@ static WERROR cmd_spoolss_getprinter(struct 
rpc_pipe_client *cli,
        case 3:
                display_print_info3(&info.info3);
                break;
+       case 4:
+               display_print_info4(&info.info4);
+               break;
+       case 5:
+               display_print_info5(&info.info5);
+               break;
+       case 6:
+               display_print_info6(&info.info6);
+               break;
        case 7:
                display_print_info7(&info.info7);
                break;
@@ -917,7 +968,8 @@ static void display_print_driver1(struct 
spoolss_DriverInfo1 *r)
        }
 
        printf("Printer Driver Info 1:\n");
-       printf("\tDriver Name: [%s]\n\n", r->driver_name);
+       printf("\tDriver Name: [%s]\n", r->driver_name);
+       printf("\n");
 }
 
 /****************************************************************************
@@ -935,7 +987,8 @@ static void display_print_driver2(struct 
spoolss_DriverInfo2 *r)
        printf("\tArchitecture: [%s]\n", r->architecture);
        printf("\tDriver Path: [%s]\n", r->driver_path);
        printf("\tDatafile: [%s]\n", r->data_file);
-       printf("\tConfigfile: [%s]\n\n", r->config_file);
+       printf("\tConfigfile: [%s]\n", r->config_file);
+       printf("\n");
 }
 
 /****************************************************************************
@@ -955,19 +1008,165 @@ static void display_print_driver3(struct 
spoolss_DriverInfo3 *r)
        printf("\tArchitecture: [%s]\n", r->architecture);
        printf("\tDriver Path: [%s]\n", r->driver_path);
        printf("\tDatafile: [%s]\n", r->data_file);
-       printf("\tConfigfile: [%s]\n\n", r->config_file);
-       printf("\tHelpfile: [%s]\n\n", r->help_file);
+       printf("\tConfigfile: [%s]\n", r->config_file);
+       printf("\tHelpfile: [%s]\n", r->help_file);
 
-       for (i=0; r->dependent_files[i] != NULL; i++) {
+       for (i=0; r->dependent_files && r->dependent_files[i] != NULL; i++) {
                printf("\tDependentfiles: [%s]\n", r->dependent_files[i]);
        }
 
+       printf("\tMonitorname: [%s]\n", r->monitor_name);
+       printf("\tDefaultdatatype: [%s]\n", r->default_datatype);
+       printf("\n");
+}
+
+/****************************************************************************
+****************************************************************************/
+
+static void display_print_driver4(struct spoolss_DriverInfo4 *r)
+{
+       int i;
+
+       if (!r) {
+               return;
+       }
+
+       printf("Printer Driver Info 4:\n");
+       printf("\tVersion: [%x]\n", r->version);
+       printf("\tDriver Name: [%s]\n", r->driver_name);
+       printf("\tArchitecture: [%s]\n", r->architecture);
+       printf("\tDriver Path: [%s]\n", r->driver_path);
+       printf("\tDatafile: [%s]\n", r->data_file);
+       printf("\tConfigfile: [%s]\n", r->config_file);
+       printf("\tHelpfile: [%s]\n", r->help_file);
+
+       for (i=0; r->dependent_files && r->dependent_files[i] != NULL; i++) {
+               printf("\tDependentfiles: [%s]\n", r->dependent_files[i]);
+       }
+
+       printf("\tMonitorname: [%s]\n", r->monitor_name);
+       printf("\tDefaultdatatype: [%s]\n", r->default_datatype);
+
+       for (i=0; r->previous_names && r->previous_names[i] != NULL; i++) {
+               printf("\tPrevious Names: [%s]\n", r->previous_names[i]);
+       }
+       printf("\n");
+}
+
+/****************************************************************************
+****************************************************************************/
+
+static void display_print_driver5(struct spoolss_DriverInfo5 *r)
+{
+       if (!r) {
+               return;
+       }
+
+       printf("Printer Driver Info 5:\n");
+       printf("\tVersion: [%x]\n", r->version);
+       printf("\tDriver Name: [%s]\n", r->driver_name);
+       printf("\tArchitecture: [%s]\n", r->architecture);
+       printf("\tDriver Path: [%s]\n", r->driver_path);
+       printf("\tDatafile: [%s]\n", r->data_file);
+       printf("\tConfigfile: [%s]\n", r->config_file);
+       printf("\tDriver Attributes: [0x%x]\n", r->driver_attributes);
+       printf("\tConfig Version: [0x%x]\n", r->config_version);
+       printf("\tDriver Version: [0x%x]\n", r->driver_version);
        printf("\n");
+}
+
+/****************************************************************************
+****************************************************************************/
+
+static void display_print_driver6(struct spoolss_DriverInfo6 *r)
+{
+       int i;
+
+       if (!r) {
+               return;
+       }
+
+       printf("Printer Driver Info 6:\n");
+       printf("\tVersion: [%x]\n", r->version);
+       printf("\tDriver Name: [%s]\n", r->driver_name);
+       printf("\tArchitecture: [%s]\n", r->architecture);
+       printf("\tDriver Path: [%s]\n", r->driver_path);
+       printf("\tDatafile: [%s]\n", r->data_file);
+       printf("\tConfigfile: [%s]\n", r->config_file);
+       printf("\tHelpfile: [%s]\n", r->help_file);
+
+       for (i=0; r->dependent_files && r->dependent_files[i] != NULL; i++) {
+               printf("\tDependentfiles: [%s]\n", r->dependent_files[i]);
+       }
 
        printf("\tMonitorname: [%s]\n", r->monitor_name);
-       printf("\tDefaultdatatype: [%s]\n\n", r->default_datatype);
+       printf("\tDefaultdatatype: [%s]\n", r->default_datatype);
+
+       for (i=0; r->previous_names && r->previous_names[i] != NULL; i++) {
+               printf("\tPrevious Names: [%s]\n", r->previous_names[i]);
+       }
+
+       printf("\tDriver Date: [%s]\n", nt_time_string(talloc_tos(), 
r->driver_date));
+       printf("\tDriver Version: [0x%016llx]\n", r->driver_version);
+       printf("\tManufacturer Name: [%s]\n", r->manufacturer_name);
+       printf("\tManufacturer Url: [%s]\n", r->manufacturer_url);
+       printf("\tHardware ID: [%s]\n", r->hardware_id);
+       printf("\tProvider: [%s]\n", r->provider);
+
+       printf("\n");
 }
 
+/****************************************************************************
+****************************************************************************/
+
+static void display_print_driver8(struct spoolss_DriverInfo8 *r)
+{
+       int i;
+
+       if (!r) {
+               return;
+       }
+
+       printf("Printer Driver Info 8:\n");
+       printf("\tVersion: [%x]\n", r->version);
+       printf("\tDriver Name: [%s]\n", r->driver_name);
+       printf("\tArchitecture: [%s]\n", r->architecture);
+       printf("\tDriver Path: [%s]\n", r->driver_path);
+       printf("\tDatafile: [%s]\n", r->data_file);
+       printf("\tConfigfile: [%s]\n", r->config_file);
+       printf("\tHelpfile: [%s]\n", r->help_file);
+       printf("\tMonitorname: [%s]\n", r->monitor_name);
+       printf("\tDefaultdatatype: [%s]\n", r->default_datatype);
+
+       for (i=0; r->dependent_files && r->dependent_files[i] != NULL; i++) {
+               printf("\tDependentfiles: [%s]\n", r->dependent_files[i]);
+       }
+
+       for (i=0; r->previous_names && r->previous_names[i] != NULL; i++) {
+               printf("\tPrevious Names: [%s]\n", r->previous_names[i]);
+       }
+
+       printf("\tDriver Date: [%s]\n", nt_time_string(talloc_tos(), 
r->driver_date));
+       printf("\tDriver Version: [0x%016llx]\n", r->driver_version);
+       printf("\tManufacturer Name: [%s]\n", r->manufacturer_name);
+       printf("\tManufacturer Url: [%s]\n", r->manufacturer_url);
+       printf("\tHardware ID: [%s]\n", r->hardware_id);
+       printf("\tProvider: [%s]\n", r->provider);
+       printf("\tPrint Processor: [%s]\n", r->print_processor);
+       printf("\tVendor Setup: [%s]\n", r->vendor_setup);
+       for (i=0; r->color_profiles && r->color_profiles[i] != NULL; i++) {
+               printf("\tColor Profiles: [%s]\n", r->color_profiles[i]);
+       }
+       printf("\tInf Path: [%s]\n", r->inf_path);
+       printf("\tPrinter Driver Attributes: [0x%x]\n", 
r->printer_driver_attributes);
+       for (i=0; r->core_driver_dependencies && r->core_driver_dependencies[i] 
!= NULL; i++) {
+               printf("\tCore Driver Dependencies: [%s]\n", 
r->core_driver_dependencies[i]);
+       }
+       printf("\tMin Driver Inbox Driver Version Date: [%s]\n", 
nt_time_string(talloc_tos(), r->min_inbox_driver_ver_date));
+       printf("\tMin Driver Inbox Driver Version Version: [0x%016llx]\n", 
r->min_inbox_driver_ver_version);
+
+       printf("\n");
+}
 
 /****************************************************************************
 ****************************************************************************/
@@ -1044,6 +1243,18 @@ static WERROR cmd_spoolss_getdriver(struct 
rpc_pipe_client *cli,
                case 3:
                        display_print_driver3(&info.info3);
                        break;
+               case 4:
+                       display_print_driver4(&info.info4);
+                       break;
+               case 5:
+                       display_print_driver5(&info.info5);
+                       break;
+               case 6:
+                       display_print_driver6(&info.info6);
+                       break;
+               case 8:
+                       display_print_driver8(&info.info8);
+                       break;
                default:
                        printf("unknown info level %d\n", level);
                        break;
@@ -1136,6 +1347,26 @@ static WERROR cmd_spoolss_enum_drivers(struct 
rpc_pipe_client *cli,
                                display_print_driver3(&info[j].info3);
                        }
                        break;
+               case 4:
+                       for (j=0; j < count; j++) {
+                               display_print_driver4(&info[j].info4);
+                       }
+                       break;
+               case 5:
+                       for (j=0; j < count; j++) {
+                               display_print_driver5(&info[j].info5);
+                       }
+                       break;
+               case 6:
+                       for (j=0; j < count; j++) {
+                               display_print_driver6(&info[j].info6);
+                       }
+                       break;
+               case 8:
+                       for (j=0; j < count; j++) {
+                               display_print_driver8(&info[j].info8);
+                       }
+                       break;
                default:
                        printf("unknown info level %d\n", level);
                        return WERR_UNKNOWN_LEVEL;


-- 
Samba Shared Repository

Reply via email to