From 3fa58844d2dc77c845d4df560e870ff994f1c53e Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Wed, 16 Nov 2016 19:17:55 +0100 Subject: [PATCH] s3-spoolss: also set new os_major,minor,build values in printer info 0 Guenther Signed-off-by: Guenther Deschner Reviewed-by: Jeremy Allison --- source3/rpc_server/spoolss/srv_spoolss_nt.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index 8a32db8c4c7..7f9f59be456 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -3870,6 +3870,7 @@ static WERROR construct_printer_info0(TALLOC_CTX *mem_ctx, struct timeval setuptime; print_status_struct status; WERROR result; + int os_major, os_minor, os_build; result = create_printername(mem_ctx, servername, info2->printername, &r->printername); if (!W_ERROR_IS_OK(result)) { @@ -3916,9 +3917,20 @@ static WERROR construct_printer_info0(TALLOC_CTX *mem_ctx, */ r->global_counter = session_counter->counter; r->total_pages = 0; + /* in 2.2 we reported ourselves as 0x0004 and 0x0565 */ - SSVAL(&r->version, 0, 0x0005); /* NT 5 */ - SSVAL(&r->version, 2, 0x0893); /* build 2195 */ + + os_major = lp_parm_int(GLOBAL_SECTION_SNUM, + "spoolss", "os_major", 5); + os_minor = lp_parm_int(GLOBAL_SECTION_SNUM, + "spoolss", "os_minor", 2); + os_build = lp_parm_int(GLOBAL_SECTION_SNUM, + "spoolss", "os_build", 3790); + + SCVAL(&r->version, 0, os_major); + SCVAL(&r->version, 1, os_minor); + SSVAL(&r->version, 2, os_build); + r->free_build = SPOOLSS_RELEASE_BUILD; r->spooling = 0; r->max_spooling = 0; -- 2.11.4.GIT