From: Dmitry Timoshkov Subject: Re: [PATCH] wbemprox: Return WBEM_E_ACCESS_DENIED from IEnumWbemClassObject::Next() if the object is empty. Message-Id: <20190708180219.c75ae7e744400d7966cb5ed3@baikal.ru> Date: Mon, 8 Jul 2019 18:02:19 +0800 In-Reply-To: References: <20190708130718.675b6fbc701cdbb0ea932f2d@baikal.ru> <2ee08af8b40c9d679d65527d4f272d40238c1cba.camel@codeweavers.com> <20190708170411.c58c4005590d2389c858ff82@baikal.ru> <7bca5a82c631ba4af4a93aea93276b8bf8307822.camel@codeweavers.com> <20190708173703.66c377af2052013780bd3d6c@baikal.ru> Hans Leidekker wrote: > On Mon, 2019-07-08 at 17:37 +0800, Dmitry Timoshkov wrote: > > Looks like this is a result of executing from an MSI custom action. > > > > Is there a way to detect such a case and return an appropriate error > > > > value? > > > > > > The error code suggests that the custom action is run with insufficient > > > permissions. If that's the case we'd need to do the same and add a permission > > > check somewhere. > > > > Under Windows MSI custom action is executed in the context of an MSI server, > > which probably runs as a restricted process, and which doesn't exist in Wine. > > Custom actions are executed in a seperate process in Wine. Yes, but that's obviously not an MSI server which probably executes under a resticted user account in Windows. > > Could you suggest a place in Wine where a permission check could be added? > > It's not clear to me if this is a general WMI thing or if it depends on the > object being queried. I'll copy WMI tests from dlls/wbemprox/tests to the MSI custom action tests to get a picture how it works under Windows. -- Dmitry.