summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-09-06 16:07:24 +0200
committerAndreas Schneider <asn@samba.org>2010-09-08 17:38:29 +0200
commit80eba8143802dec1cad6debd85df3ab5ff47c83e (patch)
tree7fd13ac09c520759ba2eee78374d6d33fde9c06a /source3
parent77b9b979668d5cbe38d3073f5d7ca26d03bf33b9 (diff)
downloadsamba-80eba8143802dec1cad6debd85df3ab5ff47c83e.tar.gz
samba-80eba8143802dec1cad6debd85df3ab5ff47c83e.tar.bz2
samba-80eba8143802dec1cad6debd85df3ab5ff47c83e.zip
s3-spoolss: Fixed a possible crash bug.
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss_util.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_spoolss_util.c b/source3/rpc_server/srv_spoolss_util.c
index 5fbdc0b406..927bb5ed0c 100644
--- a/source3/rpc_server/srv_spoolss_util.c
+++ b/source3/rpc_server/srv_spoolss_util.c
@@ -2337,9 +2337,23 @@ WERROR winreg_get_printer_secdesc(TALLOC_CTX *mem_ctx,
goto done;
create_default:
+ result = winreg_printer_openkey(tmp_ctx,
+ server_info,
+ msg_ctx,
+ &winreg_pipe,
+ path,
+ "",
+ true,
+ access_mask,
+ &hive_hnd,
+ &key_hnd);
+ if (!W_ERROR_IS_OK(result)) {
+ goto done;
+ }
+
result = spoolss_create_default_secdesc(tmp_ctx, &secdesc);
if (!W_ERROR_IS_OK(result)) {
- return result;
+ goto done;
}
/* If security descriptor is owned by S-1-1-0 and winbindd is up,