Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
polkit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zbigniew Jędrzejewski-Szmek
polkit
Commits
84a83a87
Commit
84a83a87
authored
Jul 15, 2009
by
David Zeuthen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move authentication agent bits to separate authority subclass
parent
20d1288f
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2132 additions
and
1734 deletions
+2132
-1734
docs/polkit/polkit-1-docs.xml
docs/polkit/polkit-1-docs.xml
+1
-0
docs/polkit/polkit-1-sections.txt
docs/polkit/polkit-1-sections.txt
+17
-1
docs/polkit/polkit-1.types
docs/polkit/polkit-1.types
+2
-1
src/polkitbackend/Makefile.am
src/polkitbackend/Makefile.am
+2
-0
src/polkitbackend/polkitbackend.h
src/polkitbackend/polkitbackend.h
+1
-0
src/polkitbackend/polkitbackendinteractiveauthority.c
src/polkitbackend/polkitbackendinteractiveauthority.c
+1882
-0
src/polkitbackend/polkitbackendinteractiveauthority.h
src/polkitbackend/polkitbackendinteractiveauthority.h
+138
-0
src/polkitbackend/polkitbackendlocalauthority.c
src/polkitbackend/polkitbackendlocalauthority.c
+56
-1725
src/polkitbackend/polkitbackendlocalauthority.h
src/polkitbackend/polkitbackendlocalauthority.h
+27
-4
src/polkitbackend/polkitbackendtypes.h
src/polkitbackend/polkitbackendtypes.h
+6
-3
No files found.
docs/polkit/polkit-1-docs.xml
View file @
84a83a87
...
...
@@ -90,6 +90,7 @@
<part
id=
"ref-backend-api"
>
<title>
Backend API Reference
</title>
<xi:include
href=
"xml/polkitbackendauthority.xml"
/>
<xi:include
href=
"xml/polkitbackendinteractiveauthority.xml"
/>
<xi:include
href=
"xml/polkitbackendlocalauthority.xml"
/>
<xi:include
href=
"xml/polkitbackendactionpool.xml"
/>
<xi:include
href=
"xml/polkitbackendsessionmonitor.xml"
/>
...
...
docs/polkit/polkit-1-sections.txt
View file @
84a83a87
...
...
@@ -291,7 +291,6 @@ POLKIT_BACKEND_ACTION_LOOKUP_GET_IFACE
<TITLE>PolkitBackendLocalAuthority</TITLE>
PolkitBackendLocalAuthority
PolkitBackendLocalAuthorityClass
polkit_backend_local_authority_new
<SUBSECTION Standard>
POLKIT_BACKEND_LOCAL_AUTHORITY
POLKIT_BACKEND_IS_LOCAL_AUTHORITY
...
...
@@ -302,6 +301,23 @@ POLKIT_BACKEND_IS_LOCAL_AUTHORITY_CLASS
POLKIT_BACKEND_LOCAL_AUTHORITY_GET_CLASS
</SECTION>
<SECTION>
<FILE>polkitbackendinteractiveauthority</FILE>
<TITLE>PolkitBackendInteractiveAuthority</TITLE>
PolkitBackendInteractiveAuthority
PolkitBackendInteractiveAuthorityClass
polkit_backend_interactive_authority_get_admin_identities
polkit_backend_interactive_authority_check_authorization_sync
<SUBSECTION Standard>
POLKIT_BACKEND_INTERACTIVE_AUTHORITY
POLKIT_BACKEND_IS_INTERACTIVE_AUTHORITY
POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY
polkit_backend_interactive_authority_get_type
POLKIT_BACKEND_INTERACTIVE_AUTHORITY_CLASS
POLKIT_BACKEND_IS_INTERACTIVE_AUTHORITY_CLASS
POLKIT_BACKEND_INTERACTIVE_AUTHORITY_GET_CLASS
</SECTION>
<SECTION>
<FILE>polkitbackendactionpool</FILE>
<TITLE>PolkitBackendActionPool</TITLE>
...
...
docs/polkit/polkit-1.types
View file @
84a83a87
...
...
@@ -14,8 +14,9 @@ polkit_error_get_type
polkit_authorization_result_get_type
polkit_backend_authority_get_type
polkit_backend_
action_lookup
_get_type
polkit_backend_
interactive_authority
_get_type
polkit_backend_local_authority_get_type
polkit_backend_action_lookup_get_type
polkit_backend_action_pool_get_type
polkit_backend_session_monitor_get_type
polkit_backend_config_source_get_type
...
...
src/polkitbackend/Makefile.am
View file @
84a83a87
...
...
@@ -41,6 +41,7 @@ libpolkit_backend_1include_HEADERS = \
polkitbackend.h
\
polkitbackendtypes.h
\
polkitbackendauthority.h
\
polkitbackendinteractiveauthority.h
\
polkitbackendlocalauthority.h
\
polkitbackendactionpool.h
\
polkitbackendsessionmonitor.h
\
...
...
@@ -55,6 +56,7 @@ libpolkit_backend_1_la_SOURCES = \
polkitbackendtypes.h
\
polkitbackendprivate.h
\
polkitbackendauthority.h polkitbackendauthority.c
\
polkitbackendinteractiveauthority.h polkitbackendinteractiveauthority.c
\
polkitbackendlocalauthority.h polkitbackendlocalauthority.c
\
polkitbackendactionpool.h polkitbackendactionpool.c
\
polkitbackendsessionmonitor.h polkitbackendsessionmonitor.c
\
...
...
src/polkitbackend/polkitbackend.h
View file @
84a83a87
...
...
@@ -31,6 +31,7 @@
#define _POLKIT_BACKEND_INSIDE_POLKIT_BACKEND_H 1
#include <polkitbackend/polkitbackendtypes.h>
#include <polkitbackend/polkitbackendauthority.h>
#include <polkitbackend/polkitbackendinteractiveauthority.h>
#include <polkitbackend/polkitbackendlocalauthority.h>
#include <polkitbackend/polkitbackendactionpool.h>
#include <polkitbackend/polkitbackendsessionmonitor.h>
...
...
src/polkitbackend/polkitbackendinteractiveauthority.c
0 → 100644
View file @
84a83a87
This diff is collapsed.
Click to expand it.
src/polkitbackend/polkitbackendinteractiveauthority.h
0 → 100644
View file @
84a83a87
/*
* Copyright (C) 2008 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#if !defined (_POLKIT_BACKEND_COMPILATION) && !defined(_POLKIT_BACKEND_INSIDE_POLKIT_BACKEND_H)
#error "Only <polkitbackend/polkitbackend.h> can be included directly, this file may disappear or change contents."
#endif
#ifndef __POLKIT_BACKEND_INTERACTIVE_AUTHORITY_H
#define __POLKIT_BACKEND_INTERACTIVE_AUTHORITY_H
#include <glib-object.h>
#include <polkitbackend/polkitbackendtypes.h>
#include <polkitbackend/polkitbackendauthority.h>
G_BEGIN_DECLS
#define POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY (polkit_backend_interactive_authority_get_type ())
#define POLKIT_BACKEND_INTERACTIVE_AUTHORITY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY, PolkitBackendInteractiveAuthority))
#define POLKIT_BACKEND_INTERACTIVE_AUTHORITY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY, PolkitBackendInteractiveAuthorityClass))
#define POLKIT_BACKEND_INTERACTIVE_AUTHORITY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY,PolkitBackendInteractiveAuthorityClass))
#define POLKIT_BACKEND_IS_INTERACTIVE_AUTHORITY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY))
#define POLKIT_BACKEND_IS_INTERACTIVE_AUTHORITY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY))
typedef
struct
_PolkitBackendInteractiveAuthorityClass
PolkitBackendInteractiveAuthorityClass
;
/**
* PolkitBackendInteractiveAuthority:
*
* The #PolkitBackendInteractiveAuthority struct should not be accessed directly.
*/
struct
_PolkitBackendInteractiveAuthority
{
/*< private >*/
PolkitBackendAuthority
parent_instance
;
};
/**
* PolkitBackendInteractiveAuthorityClass:
* @parent_class: The parent class.
* @get_admin_identities: Returns list of identities for administrator authentication or %NULL to use the default
* implementation. See polkit_backend_interactive_authority_get_admin_identities() for details.
* @check_authorization_sync: Checks for an authorization or %NULL to use the default implementation.
* See polkit_backend_interactive_authority_check_authorization_sync() for details.
*
* Class structure for #PolkitBackendInteractiveAuthority.
*/
struct
_PolkitBackendInteractiveAuthorityClass
{
/*< public >*/
PolkitBackendAuthorityClass
parent_class
;
/* VTable */
GList
*
(
*
get_admin_identities
)
(
PolkitBackendInteractiveAuthority
*
authority
,
PolkitSubject
*
caller
,
PolkitSubject
*
subject
,
const
gchar
*
action_id
,
PolkitDetails
*
details
);
PolkitImplicitAuthorization
(
*
check_authorization_sync
)
(
PolkitBackendInteractiveAuthority
*
authority
,
PolkitSubject
*
caller
,
PolkitSubject
*
subject
,
const
gchar
*
action_id
,
PolkitDetails
*
details
,
PolkitImplicitAuthorization
implicit
);
/*< private >*/
/* Padding for future expansion */
void
(
*
_polkit_reserved1
)
(
void
);
void
(
*
_polkit_reserved2
)
(
void
);
void
(
*
_polkit_reserved3
)
(
void
);
void
(
*
_polkit_reserved4
)
(
void
);
void
(
*
_polkit_reserved5
)
(
void
);
void
(
*
_polkit_reserved6
)
(
void
);
void
(
*
_polkit_reserved7
)
(
void
);
void
(
*
_polkit_reserved8
)
(
void
);
void
(
*
_polkit_reserved9
)
(
void
);
void
(
*
_polkit_reserved10
)
(
void
);
void
(
*
_polkit_reserved11
)
(
void
);
void
(
*
_polkit_reserved12
)
(
void
);
void
(
*
_polkit_reserved13
)
(
void
);
void
(
*
_polkit_reserved14
)
(
void
);
void
(
*
_polkit_reserved15
)
(
void
);
void
(
*
_polkit_reserved16
)
(
void
);
void
(
*
_polkit_reserved17
)
(
void
);
void
(
*
_polkit_reserved18
)
(
void
);
void
(
*
_polkit_reserved19
)
(
void
);
void
(
*
_polkit_reserved20
)
(
void
);
void
(
*
_polkit_reserved21
)
(
void
);
void
(
*
_polkit_reserved22
)
(
void
);
void
(
*
_polkit_reserved23
)
(
void
);
void
(
*
_polkit_reserved24
)
(
void
);
void
(
*
_polkit_reserved25
)
(
void
);
void
(
*
_polkit_reserved26
)
(
void
);
void
(
*
_polkit_reserved27
)
(
void
);
void
(
*
_polkit_reserved28
)
(
void
);
void
(
*
_polkit_reserved29
)
(
void
);
void
(
*
_polkit_reserved30
)
(
void
);
void
(
*
_polkit_reserved31
)
(
void
);
void
(
*
_polkit_reserved32
)
(
void
);
};
GType
polkit_backend_interactive_authority_get_type
(
void
)
G_GNUC_CONST
;
GList
*
polkit_backend_interactive_authority_get_admin_identities
(
PolkitBackendInteractiveAuthority
*
authority
,
PolkitSubject
*
caller
,
PolkitSubject
*
subject
,
const
gchar
*
action_id
,
PolkitDetails
*
details
);
PolkitImplicitAuthorization
polkit_backend_interactive_authority_check_authorization_sync
(
PolkitBackendInteractiveAuthority
*
authority
,
PolkitSubject
*
caller
,
PolkitSubject
*
subject
,
const
gchar
*
action_id
,
PolkitDetails
*
details
,
PolkitImplicitAuthorization
implicit
);
G_END_DECLS
#endif
/* __POLKIT_BACKEND_INTERACTIVE_AUTHORITY_H */
src/polkitbackend/polkitbackendlocalauthority.c
View file @
84a83a87
This diff is collapsed.
Click to expand it.
src/polkitbackend/polkitbackendlocalauthority.h
View file @
84a83a87
...
...
@@ -28,7 +28,7 @@
#include <glib-object.h>
#include <polkitbackend/polkitbackendtypes.h>
#include <polkitbackend/polkitbackendauthority.h>
#include <polkitbackend/polkitbackend
interactive
authority.h>
G_BEGIN_DECLS
...
...
@@ -49,7 +49,7 @@ typedef struct _PolkitBackendLocalAuthorityClass PolkitBackendLocalAuthorityC
struct
_PolkitBackendLocalAuthority
{
/*< private >*/
PolkitBackendAuthority
parent_instance
;
PolkitBackend
Interactive
Authority
parent_instance
;
};
/**
...
...
@@ -61,7 +61,7 @@ struct _PolkitBackendLocalAuthority
struct
_PolkitBackendLocalAuthorityClass
{
/*< public >*/
PolkitBackendAuthorityClass
parent_class
;
PolkitBackend
Interactive
AuthorityClass
parent_class
;
/*< private >*/
/* Padding for future expansion */
...
...
@@ -73,10 +73,33 @@ struct _PolkitBackendLocalAuthorityClass
void
(
*
_polkit_reserved6
)
(
void
);
void
(
*
_polkit_reserved7
)
(
void
);
void
(
*
_polkit_reserved8
)
(
void
);
void
(
*
_polkit_reserved9
)
(
void
);
void
(
*
_polkit_reserved10
)
(
void
);
void
(
*
_polkit_reserved11
)
(
void
);
void
(
*
_polkit_reserved12
)
(
void
);
void
(
*
_polkit_reserved13
)
(
void
);
void
(
*
_polkit_reserved14
)
(
void
);
void
(
*
_polkit_reserved15
)
(
void
);
void
(
*
_polkit_reserved16
)
(
void
);
void
(
*
_polkit_reserved17
)
(
void
);
void
(
*
_polkit_reserved18
)
(
void
);
void
(
*
_polkit_reserved19
)
(
void
);
void
(
*
_polkit_reserved20
)
(
void
);
void
(
*
_polkit_reserved21
)
(
void
);
void
(
*
_polkit_reserved22
)
(
void
);
void
(
*
_polkit_reserved23
)
(
void
);
void
(
*
_polkit_reserved24
)
(
void
);
void
(
*
_polkit_reserved25
)
(
void
);
void
(
*
_polkit_reserved26
)
(
void
);
void
(
*
_polkit_reserved27
)
(
void
);
void
(
*
_polkit_reserved28
)
(
void
);
void
(
*
_polkit_reserved29
)
(
void
);
void
(
*
_polkit_reserved30
)
(
void
);
void
(
*
_polkit_reserved31
)
(
void
);
void
(
*
_polkit_reserved32
)
(
void
);
};
GType
polkit_backend_local_authority_get_type
(
void
)
G_GNUC_CONST
;
PolkitBackendAuthority
*
polkit_backend_local_authority_new
(
void
);
G_END_DECLS
...
...
src/polkitbackend/polkitbackendtypes.h
View file @
84a83a87
...
...
@@ -24,9 +24,6 @@
#include <glib-object.h>
struct
_PolkitBackendAuthority
;
typedef
struct
_PolkitBackendAuthority
PolkitBackendAuthority
;
struct
_PolkitBackendSessionMonitor
;
typedef
struct
_PolkitBackendSessionMonitor
PolkitBackendSessionMonitor
;
...
...
@@ -36,6 +33,12 @@ typedef struct _PolkitBackendConfigSource PolkitBackendConfigSource;
struct
_PolkitBackendActionLookup
;
typedef
struct
_PolkitBackendActionLookup
PolkitBackendActionLookup
;
/* Dummy typedef */
struct
_PolkitBackendAuthority
;
typedef
struct
_PolkitBackendAuthority
PolkitBackendAuthority
;
struct
_PolkitBackendInteractiveAuthority
;
typedef
struct
_PolkitBackendInteractiveAuthority
PolkitBackendInteractiveAuthority
;
struct
_PolkitBackendLocalAuthority
;
typedef
struct
_PolkitBackendLocalAuthority
PolkitBackendLocalAuthority
;
...
...
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