s3-spoolss: Make it easier to manipulate the returned OSVersion at runtime.
authorGünther Deschner <gd@samba.org>
Sat, 19 Jan 2013 00:37:29 +0000 (01:37 +0100)
committerAndreas Schneider <asn@samba.org>
Thu, 24 Jan 2013 16:42:25 +0000 (17:42 +0100)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/rpc_server/spoolss/srv_spoolss_nt.c

index 3107cda36fbcdf65a7e561fe4477a6b86dee921b..ef203d8f545c0fb4452f39f5077a3f7b4d3cd325 100644 (file)
@@ -2338,9 +2338,13 @@ static WERROR getprinterdata_printer_server(TALLOC_CTX *mem_ctx,
                enum ndr_err_code ndr_err;
                struct spoolss_OSVersion os;
 
-               os.major                = 5;    /* Windows 2000 == 5.0 */
-               os.minor                = 0;
-               os.build                = 2195; /* build */
+               os.major                = lp_parm_int(GLOBAL_SECTION_SNUM,
+                                                     "spoolss", "os_major", 5);
+                                                     /* Windows 2000 == 5.0 */
+               os.minor                = lp_parm_int(GLOBAL_SECTION_SNUM,
+                                                     "spoolss", "os_minor", 0);
+               os.build                = lp_parm_int(GLOBAL_SECTION_SNUM,
+                                                     "spoolss", "os_build", 2195);
                os.extra_string         = "";   /* leave extra string empty */
 
                ndr_err = ndr_push_struct_blob(&blob, mem_ctx, &os,
@@ -2349,6 +2353,10 @@ static WERROR getprinterdata_printer_server(TALLOC_CTX *mem_ctx,
                        return WERR_GENERAL_FAILURE;
                }
 
+               if (DEBUGLEVEL >= 10) {
+                       NDR_PRINT_DEBUG(spoolss_OSVersion, &os);
+               }
+
                *type = REG_BINARY;
                data->binary = blob;