summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss_nt.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-03-03 17:33:57 +0000
committerGerald Carter <jerry@samba.org>2003-03-03 17:33:57 +0000
commit03a4c1907f93a2efb985ca69180f800be285926d (patch)
tree12983a99ec976cb85a168bf26e8d72e5ebd4ab1c /source3/rpc_server/srv_spoolss_nt.c
parent21be9e77761f56abf2b00d4faece2fae2f45e3b6 (diff)
downloadsamba-03a4c1907f93a2efb985ca69180f800be285926d.tar.gz
samba-03a4c1907f93a2efb985ca69180f800be285926d.tar.bz2
samba-03a4c1907f93a2efb985ca69180f800be285926d.zip
* always report ourselves as a Windows 2000 print server (even
without ADS support) * add "MinorVersion" print server data key and comment on "OSVersion" (This used to be commit 342734e3de71c7dc8e3d24fd66dae58cf647a569)
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c37
1 files changed, 29 insertions, 8 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 4090800fc9..8073e3cf28 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -2220,14 +2220,37 @@ static WERROR getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint
*type = 0x4;
if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL)
return WERR_NOMEM;
-#ifdef HAVE_ADS
SIVAL(*data, 0, 3);
-#else
+ *needed = 0x4;
+ return WERR_OK;
+ }
+
+ if (!StrCaseCmp(value, "MinorVersion")) {
+ *type = 0x4;
+ if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL)
+ return WERR_NOMEM;
+ SIVAL(*data, 0, 0);
+ *needed = 0x4;
+ return WERR_OK;
+ }
+
+#if 0 /* JERRY */
+ /* REG_BINARY
+ * uint32 size = 0x114
+ * uint32 major = 5
+ * uint32 minor = [0|1]
+ * uint32 build = [2195|2600]
+ * extra unicode string = e.g. "Service Pack 3"
+ */
+ if (!StrCaseCmp(value, "OSVersion")) {
+ *type = 0x4;
+ if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL)
+ return WERR_NOMEM;
SIVAL(*data, 0, 2);
-#endif
*needed = 0x4;
return WERR_OK;
}
+#endif
if (!StrCaseCmp(value, "DefaultSpoolDirectory")) {
fstring string;
@@ -3843,13 +3866,11 @@ static BOOL construct_printer_info_0(Printer_entry *print_hnd, PRINTER_INFO_0 *p
printer->global_counter = global_counter;
printer->total_pages = 0;
-#ifdef HAVE_ADS
+
+ /* in 2.2 we reported ourselves as 0x0004 and 0x0565 */
printer->major_version = 0x0005; /* NT 5 */
printer->build_version = 0x0893; /* build 2195 */
-#else
- printer->major_version = 0x0004; /* NT 4 */
- printer->build_version = 0x0565; /* build 1381 */
-#endif
+
printer->unknown7 = 0x1;
printer->unknown8 = 0x0;
printer->unknown9 = 0x0;