summaryrefslogtreecommitdiffstats
path: root/tests/sudo/tst_sudo.cpp
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2018-03-14 22:54:36 +0100
committerDominik Holland <dominik.holland@pelagicore.com>2018-03-16 13:37:32 +0000
commitcfafae0d9f5b6dd284001f1377bc340205c991e0 (patch)
treea47f3e0f8e0bac0c184040ace81217e3bc45c2a9 /tests/sudo/tst_sudo.cpp
parent824923551e142abd4685ee9368f573c1fa546fed (diff)
Simplify the sudo server interface
Also bring it more in line with how the other APIs work in the AM. Change-Id: I5ec1b4c3313c90808411ca374fac1552142c4372 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Diffstat (limited to 'tests/sudo/tst_sudo.cpp')
-rw-r--r--tests/sudo/tst_sudo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/sudo/tst_sudo.cpp b/tests/sudo/tst_sudo.cpp
index 66741104..fa859b43 100644
--- a/tests/sudo/tst_sudo.cpp
+++ b/tests/sudo/tst_sudo.cpp
@@ -499,7 +499,10 @@ static tst_Sudo *tstSudo = nullptr;
int main(int argc, char **argv)
{
- startedSudoServer = forkSudoServer(DropPrivilegesRegainable, &sudoServerError);
+ try {
+ Sudo::forkServer(Sudo::DropPrivilegesRegainable);
+ startedSudoServer = true;
+ } catch (...) { }
QCoreApplication a(argc, argv);
tstSudo = new tst_Sudo(&a);