From: Justin Stephenson Date: Mon, 17 Sep 2018 15:19:02 +0000 (-0400) Subject: librpc:idl: Fix pszDestInfPath winspool parameter type X-Git-Tag: ldb-1.6.1~309 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c1514e677f9b6abc91be9dcf94375fbece9fdcc;p=thirdparty%2Fsamba.git librpc:idl: Fix pszDestInfPath winspool parameter type The in/out type of pszDestInfPath needs to be a string type for RPC call UploadPrinterDriverPackage. Per the Spec: [in, out, unique, size_is(*pcchDestInfPath)] wchar_t* pszDestInfPath, pszDestInfPath: A pointer to a buffer that receives a string that specifies the full path of the directory to which the driver installation control file was copied. Signed-off-by: Justin Stephenson Reviewed-by: Andreas Schneider Reviewed-by: Bjoern Jacke --- diff --git a/librpc/idl/winspool.idl b/librpc/idl/winspool.idl index dfb45a128d4..5497a67d34c 100644 --- a/librpc/idl/winspool.idl +++ b/librpc/idl/winspool.idl @@ -761,7 +761,7 @@ import "misc.idl", "security.idl", "winreg.idl", "spoolss.idl"; [in] [string,charset(UTF16)] uint16 *pszInfPath, [in] [string,charset(UTF16)] uint16 *pszEnvironment, [in] winspool_UploadPrinterDriverPackageFlags dwFlags, - [in, out, unique, size_is(*pcchDestInfPath)] uint16 *pszDestInfPath, + [in, out, unique, size_is(*pcchDestInfPath)] [charset(UTF16)] uint16 *pszDestInfPath, [in, out] uint32 *pcchDestInfPath ); diff --git a/source4/torture/rpc/iremotewinspool.c b/source4/torture/rpc/iremotewinspool.c index 03613b443e3..662e132593a 100644 --- a/source4/torture/rpc/iremotewinspool.c +++ b/source4/torture/rpc/iremotewinspool.c @@ -399,8 +399,8 @@ static bool test_AsyncUploadPrinterDriverPackage(struct torture_context *tctx, "AsyncUploadPrinterDriverPackage failed"); pcchDestInfPath = 260; - r.in.pszDestInfPath = talloc_zero_array(tctx, uint16_t, pcchDestInfPath); - r.out.pszDestInfPath = talloc_zero_array(tctx, uint16_t, pcchDestInfPath); + r.in.pszDestInfPath = talloc_zero(tctx, const char); + r.out.pszDestInfPath = talloc_zero(tctx, const char); torture_assert_ntstatus_ok(tctx, dcerpc_winspool_AsyncUploadPrinterDriverPackage_r(b, tctx, &r),