struct spoolss_SetPrinterInfo2 info2;
struct spoolss_DeviceMode dm;
struct spoolss_DevmodeContainer devmode_ctr;
- struct sec_desc_buf secdesc_ctr;
DATA_BLOB blob;
NTSTATUS status;
WERROR result;
int j;
+ uint32_t info2_mask = (SPOOLSS_PRINTER_INFO_ALL)
+ & ~SPOOLSS_PRINTER_INFO_SECDESC;
if (strequal(key_name, "printers")) {
return NT_STATUS_OK;
/* Create printer info level 2 */
ZERO_STRUCT(info2);
- ZERO_STRUCT(secdesc_ctr);
info2.attributes = r.info.attributes;
info2.averageppm = r.info.averageppm;
info2.untiltime = r.info.untiltime;
/* Create Device Mode */
- if (r.devmode != NULL) {
+ if (r.devmode == NULL) {
+ info2_mask &= ~SPOOLSS_PRINTER_INFO_DEVMODE;
+ } else {
ZERO_STRUCT(dm);
dm.bitsperpel = r.devmode->bitsperpel;
result = winreg_update_printer(mem_ctx, b,
key_name,
- 0, /// FIXME !!!!!!!!!!!!!!!!!!!!!!!
+ info2_mask,
&info2,
&dm,
NULL);
}
}
+ status = NT_STATUS_OK;
done:
return status;