summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-10-01 06:42:58 +0200
committerGünther Deschner <gd@samba.org>2010-10-01 08:33:47 +0200
commit3975203a0242a01fe6d3737f8f04ec80e90cb831 (patch)
treee21239080eda2c91b69007ed79a196726a3a5e3f /source3
parentfa3264f89b1de8c7a284b8bc4469a80db7c6084f (diff)
downloadsamba-3975203a0242a01fe6d3737f8f04ec80e90cb831.tar.gz
samba-3975203a0242a01fe6d3737f8f04ec80e90cb831.tar.bz2
samba-3975203a0242a01fe6d3737f8f04ec80e90cb831.zip
s3-spoolss: fix do_drv_upgrade_printer() which must have been broken since the
days we moved away from fstrings. Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 6b447ad407..bb3b05d1b1 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1493,7 +1493,6 @@ void do_drv_upgrade_printer(struct messaging_context *msg,
const char *drivername;
int snum;
int n_services = lp_numservices();
- size_t len;
tmp_ctx = talloc_new(NULL);
if (!tmp_ctx) return;
@@ -1505,8 +1504,7 @@ void do_drv_upgrade_printer(struct messaging_context *msg,
goto done;
}
- len = MIN(data->length,sizeof(drivername)-1);
- drivername = talloc_strndup(tmp_ctx, (const char *)data->data, len);
+ drivername = talloc_strndup(tmp_ctx, (const char *)data->data, data->length);
if (!drivername) {
DEBUG(0, ("do_drv_upgrade_printer: Out of memoery ?!\n"));
goto done;
@@ -1522,6 +1520,11 @@ void do_drv_upgrade_printer(struct messaging_context *msg,
continue;
}
+ /* ignore [printers] share */
+ if (strequal(lp_const_servicename(snum), "printers")) {
+ continue;
+ }
+
result = winreg_get_printer(tmp_ctx, server_info, msg,
lp_const_servicename(snum),
&pinfo2);