From d3372c6a9e69360afd2f12168e9df09dec45ae08 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 20 Feb 2009 14:55:31 +0100 Subject: s3-spoolss: fix _spoolss_GetPrinterDriverDirectory and spoolss_GetPrintProcessorDirectory. Both calls need to return NULL in the error case to avoid ndr encoding problems. (found by smbtorture spoolss test). Guenther --- source3/rpc_server/srv_spoolss_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/rpc_server/srv_spoolss_nt.c') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 7439fe51a5..0fe66d9ed9 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -8309,7 +8309,7 @@ WERROR _spoolss_GetPrinterDriverDirectory(pipes_struct *p, &r->out.info->info1, r->in.offered, r->out.needed); - if (W_ERROR_EQUAL(werror, WERR_INSUFFICIENT_BUFFER)) { + if (!W_ERROR_IS_OK(werror)) { TALLOC_FREE(r->out.info); } break; @@ -9969,7 +9969,7 @@ WERROR _spoolss_GetPrintProcessorDirectory(pipes_struct *p, &r->out.info->info1, r->in.offered, r->out.needed); - if (W_ERROR_EQUAL(result, WERR_INSUFFICIENT_BUFFER)) { + if (!W_ERROR_IS_OK(result)) { TALLOC_FREE(r->out.info); } break; -- cgit