summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2016-11-16 19:24:37 +0100
committerJeremy Allison <jra@samba.org>2016-11-20 02:28:10 +0100
commit17bc1427f0d032cc47509c2e95ea2d5524fb7f53 (patch)
tree7f90ac5ea3d5a5cb23d9feb5784c31bb3fb36829
parent3fa58844d2dc77c845d4df560e870ff994f1c53e (diff)
downloadsamba-17bc1427f0d032cc47509c2e95ea2d5524fb7f53.tar.gz
s3-spoolss: set the defaults for os_version defines globally.
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 7f9f59be456..1dcb22755ba 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -76,6 +76,10 @@
#define MAX_OPEN_PRINTER_EXS 50
#endif
+#define GLOBAL_SPOOLSS_OS_MAJOR_DEFAULT 5
+#define GLOBAL_SPOOLSS_OS_MINOR_DEFAULT 2
+#define GLOBAL_SPOOLSS_OS_BUILD_DEFAULT 3790
+
struct notify_back_channel;
/* structure to store the printer handles */
@@ -2352,11 +2356,14 @@ static WERROR getprinterdata_printer_server(TALLOC_CTX *mem_ctx,
* used to be Windows 2000 (5.0.2195)
*/
os.major = lp_parm_int(GLOBAL_SECTION_SNUM,
- "spoolss", "os_major", 5);
+ "spoolss", "os_major",
+ GLOBAL_SPOOLSS_OS_MAJOR_DEFAULT);
os.minor = lp_parm_int(GLOBAL_SECTION_SNUM,
- "spoolss", "os_minor", 2);
+ "spoolss", "os_minor",
+ GLOBAL_SPOOLSS_OS_MINOR_DEFAULT);
os.build = lp_parm_int(GLOBAL_SECTION_SNUM,
- "spoolss", "os_build", 3790);
+ "spoolss", "os_build",
+ GLOBAL_SPOOLSS_OS_BUILD_DEFAULT);
os.extra_string = ""; /* leave extra string empty */
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, &os,
@@ -3919,13 +3926,15 @@ static WERROR construct_printer_info0(TALLOC_CTX *mem_ctx,
r->total_pages = 0;
/* in 2.2 we reported ourselves as 0x0004 and 0x0565 */
-
os_major = lp_parm_int(GLOBAL_SECTION_SNUM,
- "spoolss", "os_major", 5);
+ "spoolss", "os_major",
+ GLOBAL_SPOOLSS_OS_MAJOR_DEFAULT);
os_minor = lp_parm_int(GLOBAL_SECTION_SNUM,
- "spoolss", "os_minor", 2);
+ "spoolss", "os_minor",
+ GLOBAL_SPOOLSS_OS_MINOR_DEFAULT);
os_build = lp_parm_int(GLOBAL_SECTION_SNUM,
- "spoolss", "os_build", 3790);
+ "spoolss", "os_build",
+ GLOBAL_SPOOLSS_OS_BUILD_DEFAULT);
SCVAL(&r->version, 0, os_major);
SCVAL(&r->version, 1, os_minor);