- 16 4月, 2019 1 次提交
-
-
由 Laine Stump 提交于
When virDBusMessageRead() and virDBusMessageDecode were first added in commit 834c9c94, they were identical except that virDBusMessageRead() would unref the message after decoding it. This difference was eliminated later in commit dc7f3ffc after it became apparent that unref-ing the message so soon was never the right thing to do. The two identical functions remained though, with the tests and virDBus library itself calling the Decode variant, and all other users calling the Read variant. This patch eliminates the duplication, switching all users to virDBusMessageDecode (and moving the nice API documentation comment from the Read function up to the Decode function). Signed-off-by: NLaine Stump <laine@laine.org> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 10 4月, 2019 2 次提交
-
-
由 Peter Krempa 提交于
This reverts commit a5e16020. Getting rid of unistd.h from our headers will require more work than just fixing the broken mingw build. Revert it until I have a more complete proposal. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
util/virutil.h bogously included unistd.h. Drop it and replace it by including it directly where needed. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 14 3月, 2018 2 次提交
-
-
由 Ján Tomko 提交于
There is just one polkit now. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Policy-Kit has been replaced by polkit (referred to, respectively, as POLKIT0 and POLKIT1 in our Makefiles). The last build fix with old Policy-Kit was in May 2013: commit <442eb2ba> and build with -Wunused-label was broken since April 2016: commit <84371303> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 04 10月, 2017 1 次提交
-
-
由 Kothapally Madhu Pavan 提交于
Free DBusMessage pointer in virPolkitCheckAuth Signed-off-by: NKothapally Madhu Pavan <kmp@linux.vnet.ibm.com>
-
- 25 11月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
We have couple of functions that operate over NULL terminated lits of strings. However, our naming sucks: virStringJoin virStringFreeList virStringFreeListCount virStringArrayHasString virStringGetFirstWithPrefix We can do better: virStringListJoin virStringListFree virStringListFreeCount virStringListHasString virStringListGetFirstWithPrefix Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 5月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
Commit 0b36b0e9 broke polkit agent startup when attempting to fix a coverity warning. Refactor it properly so that we don't need the 'cmd' intermediate variable.
-
- 03 3月, 2016 1 次提交
-
-
由 John Ferlan 提交于
More fallout from changing to using virPolkitAgent and handling error paths. Needed to clear the 'cmd' once stored and of course add the virCommandFree(cmd) in the error: label.
-
- 02 3月, 2016 1 次提交
-
-
由 John Ferlan 提交于
In virPolkitAgentCreate neglected to initialize agent to NULL. If there was an error in the pipe, then we jump to error and would have an issue. Found by coverity.
-
- 01 3月, 2016 3 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 John Ferlan 提交于
Introduce virPolkitAgentCreate and virPolkitAgentDestroy virPolkitAgentCreate will run the polkit pkttyagent image as an asynchronous command in order to handle the local agent authentication via stdin/stdout. The code makes use of the pkttyagent --notify-fd mechanism to let it know when the agent is successfully registered. virPolkitAgentDestroy will close the command effectively reaping our child process
-
由 John Ferlan 提交于
When there isn't a ssh -X type session running and a user has not been added to the libvirt group, attempts to run 'virsh -c qemu:///system' commands from an otherwise unprivileged user will fail with rather generic or opaque error message: "error: authentication failed: no agent is available to authenticate" This patch will adjust the error code and message to help reflect the situation that the problem is the requested mechanism is UNAVAILABLE and a slightly more descriptive error. The result on a failure then becomes: "error: authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'" A bit more history on this - at one time a failure generated the following type message when running the 'pkcheck' as a subprocess: "error: authentication failed: polkit\56retains_authorization_after_challenge=1 Authorization requires authentication but no agent is available." but, a patch was generated to adjust the error message to help provide more details about what failed. This was pushed as commit id '96a108c9'. That patch prepended a "polkit: " to the output. It really didn't solve the problem, but gave a hint. After some time it was deemed using DBus API calls directly was a better way to go (since pkcheck calls them anyway). So, commit id '1b854c76' (more or less) copied the code from remoteDispatchAuthPolkit and adjusted it. Then commit id 'c7542573' adjusted the remote.c code to call the new API (virPolkitCheckAuth). Finally, commit id '308c0c5a' altered the code to call DBus APIs directly. In doing so, it reverted the failing error message to the generic message that would have been received from DBus anyway.
-
- 09 2月, 2016 1 次提交
-
-
由 Martin Kletzander 提交于
It does exactly the same thing as virStringListLength() and it's used in one place only. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 19 11月, 2014 1 次提交
-
-
由 Eric Blake 提交于
Use of an 'int' to represent a 'bool' value is confusing. Just because dbus made the mistake of cementing their 4-byte wire format of dbus_bool_t into their API doesn't mean we have to repeat the mistake. With a little bit of finesse, we can guarantee that we provide a large-enough value to the DBus code, while still copying only the relevant one-byte bool to the client code, and isolate the rest of our code base from the DBus stupidity. * src/util/virdbus.c (GET_NEXT_VAL): Add parameter. (virDBusMessageIterDecode): Adjust all clients. * src/util/virpolkit.c (virPolkitCheckAuth): Use nicer type. * tests/virdbustest.c (testMessageSimple, testMessageStruct): Test new behavior. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 25 9月, 2014 1 次提交
-
-
由 Pavel Hrdina 提交于
The commit 1b854c76 introduced a new function 'virPolkitCheckAuth' and in the #else section when you don't have polkit all attributes should be follwed by ATTRIBUTE_UNUSED. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 24 9月, 2014 2 次提交
-
-
由 Daniel P. Berrange 提交于
Spawning the pkcheck program every time a permission check is required is hugely expensive on CPU. The pkcheck program is just a dumb wrapper for the DBus API, so rewrite the code to use the DBus API directly. This also simplifies error handling a bit. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
There are now two places in libvirt which use polkit. Currently they use pkexec, which is set to be replaced by direct DBus API calls. Add a common API which they will both be able to use for this purpose. No tests are added at this time, since the impl will be gutted in favour of a DBus API call shortly. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-