Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Zbigniew Jędrzejewski-Szmek
polkit
Commits
20fa8e0d
Commit
20fa8e0d
authored
Nov 11, 2007
by
David Zeuthen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build for dummy backend
parent
109229bb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
src/polkit/polkit-authorization-db-dummy.c
src/polkit/polkit-authorization-db-dummy.c
+17
-0
src/polkit/polkit-authorization.c
src/polkit/polkit-authorization.c
+11
-0
src/polkit/polkit-policy-file-entry.c
src/polkit/polkit-policy-file-entry.c
+3
-0
No files found.
src/polkit/polkit-authorization-db-dummy.c
View file @
20fa8e0d
...
...
@@ -43,6 +43,7 @@
#include "polkit-authorization-db.h"
#include "polkit-utils.h"
#include "polkit-private.h"
#include "polkit-test.h"
/* PolKitAuthorizationDB structure is defined in polkit/polkit-private.h */
...
...
@@ -188,3 +189,19 @@ polkit_authorization_db_revoke_entry (PolKitAuthorizationDB *authdb,
}
#ifdef POLKIT_BUILD_TESTS
static
polkit_bool_t
_run_test
(
void
)
{
return
TRUE
;
}
PolKitTest
_test_authorization_db
=
{
"polkit_authorization_db"
,
NULL
,
NULL
,
_run_test
};
#endif
/* POLKIT_BUILD_TESTS */
src/polkit/polkit-authorization.c
View file @
20fa8e0d
...
...
@@ -591,6 +591,8 @@ polkit_authorization_get_constraint (PolKitAuthorization *auth)
#ifdef POLKIT_BUILD_TESTS
#ifdef POLKIT_AUTHDB_DEFAULT
typedef
struct
{
const
char
*
entry
;
PolKitAuthorizationScope
scope
;
...
...
@@ -770,6 +772,15 @@ _run_test (void)
return
TRUE
;
}
#else
/* POLKIT_AUTHDB_DEFAULT */
static
polkit_bool_t
_run_test
(
void
)
{
return
TRUE
;
}
#endif
/* POLKIT_AUTHDB_DEFAULT */
PolKitTest
_test_authorization
=
{
"polkit_authorization"
,
...
...
src/polkit/polkit-policy-file-entry.c
View file @
20fa8e0d
...
...
@@ -426,9 +426,12 @@ _run_test (void)
}
kit_assert
((
d
=
polkit_policy_file_entry_get_default
(
pfe
))
!=
NULL
);
#ifdef POLKIT_AUTHDB_DEFAULT
kit_assert
(
polkit_policy_default_get_allow_any
(
d
)
==
POLKIT_RESULT_NO
);
kit_assert
(
polkit_policy_default_get_allow_inactive
(
d
)
==
POLKIT_RESULT_ONLY_VIA_SELF_AUTH
);
kit_assert
(
polkit_policy_default_get_allow_active
(
d
)
==
POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH
);
#endif
polkit_policy_file_entry_ref
(
pfe
);
polkit_policy_file_entry_unref
(
pfe
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment