summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-10-01 06:07:25 +0200
committerGünther Deschner <gd@samba.org>2010-10-01 08:33:46 +0200
commit5cb5e0aa9881758ec9f5af7da4fbc002ba91f49b (patch)
tree89e2e2957982fc61d3dbfa39a2f8cc4c878ece9b
parent48fca54a29375dfad84a9863c70fed8b88d70221 (diff)
downloadsamba-5cb5e0aa9881758ec9f5af7da4fbc002ba91f49b.tar.gz
samba-5cb5e0aa9881758ec9f5af7da4fbc002ba91f49b.tar.bz2
samba-5cb5e0aa9881758ec9f5af7da4fbc002ba91f49b.zip
s3-spoolss: make sure we dont crash on NULL setprinter level2 elements as seen from win7.
Guenther
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 5f803b6304..6b447ad407 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -6127,7 +6127,8 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
printer->drivername));
notify_printer_driver(server_event_context(), msg_ctx,
- snum, printer->drivername);
+ snum, printer->drivername ?
+ printer->drivername : "");
}
}
@@ -6145,7 +6146,8 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
if (!force_update) {
notify_printer_comment(server_event_context(), msg_ctx,
- snum, printer->comment);
+ snum, printer->comment ?
+ printer->comment : "");
}
}
@@ -6164,7 +6166,8 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
if (!force_update) {
notify_printer_sharename(server_event_context(),
msg_ctx,
- snum, printer->sharename);
+ snum, printer->sharename ?
+ printer->sharename : "");
}
}
@@ -6191,7 +6194,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
if (!force_update) {
notify_printer_printername(server_event_context(),
- msg_ctx, snum, p);
+ msg_ctx, snum, p ? p : "");
}
}
@@ -6209,7 +6212,8 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
if (!force_update) {
notify_printer_port(server_event_context(),
- msg_ctx, snum, printer->portname);
+ msg_ctx, snum, printer->portname ?
+ printer->portname : "");
}
}
@@ -6228,7 +6232,8 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
if (!force_update) {
notify_printer_location(server_event_context(),
msg_ctx, snum,
- printer->location);
+ printer->location ?
+ printer->location : "");
}
}
@@ -6247,7 +6252,8 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
if (!force_update) {
notify_printer_sepfile(server_event_context(),
msg_ctx, snum,
- printer->sepfile);
+ printer->sepfile ?
+ printer->sepfile : "");
}
}