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,
return WERR_GENERAL_FAILURE;
}
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_DEBUG(spoolss_OSVersion, &os);
+ }
+
*type = REG_BINARY;
data->binary = blob;
&array, &num_strings);
}
- if (presult) {
+ if (presult != NULL) {
*presult = array;
+ } else {
+ talloc_free(array);
}
return WERR_OK;
{
struct printer_handle *printer;
WERROR result;
+ uint32_t version = r->in.client_major_version;
int snum;
return WERR_BADFID;
}
+ if (r->in.client_major_version == SPOOLSS_DRIVER_VERSION_2012) {
+ DEBUG(3,("_spoolss_GetPrinterDriver2: v4 driver requested, "
+ "downgrading to v3\n"));
+ version = SPOOLSS_DRIVER_VERSION_200X;
+ }
+
result = construct_printer_driver_info_level(p->mem_ctx,
get_session_info_system(),
p->msg_ctx,
r->in.level, r->out.info,
snum, printer->servername,
r->in.architecture,
- r->in.client_major_version);
+ version);
if (!W_ERROR_IS_OK(result)) {
TALLOC_FREE(r->out.info);
return result;
return WERR_INVALID_HANDLE;
}
- if (r->in.level != 1) {
+ if (r->in.info_ctr->level != 1) {
return WERR_UNKNOWN_LEVEL;
}
- info_1 = r->in.info.info1;
+ info_1 = r->in.info_ctr->info.info1;
/*
* a nice thing with NT is it doesn't listen to what you tell it.