const char *drivername;
int snum;
int n_services = lp_numservices();
- size_t len;
tmp_ctx = talloc_new(NULL);
if (!tmp_ctx) return;
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;
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);