Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
settingsd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
settingsd
Commits
985a02fc
Commit
985a02fc
authored
Apr 23, 2019
by
Никита Ефремов
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add pam_authentication module
parent
d638d480
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
org.etersoft.settingsd.conf
configs/dbus/org.etersoft.settingsd.conf
+5
-0
main.conf
configs/settingsd/main.conf
+3
-0
fmod_pam_authentication.py
plugins/functions/fmod_pam_authentication.py
+25
-0
No files found.
configs/dbus/org.etersoft.settingsd.conf
View file @
985a02fc
...
...
@@ -148,6 +148,11 @@
<
allow
send_destination
=
"org.etersoft.settingsd"
send_interface
=
"org.etersoft.settingsd.functions.disks.smart"
/>
</
policy
>
<!--
fmod_pam_authentication
-->
<
policy
context
=
"default"
>
<
allow
send_destination
=
"org.etersoft.settingsd"
send_interface
=
"org.etersoft.settingsd.functions.pam"
/>
</
policy
>
</
busconfig
>
...
...
configs/settingsd/main.conf
View file @
985a02fc
...
...
@@ -27,3 +27,6 @@ enabled = yes
[
date_time
]
enabled
=
yes
[
pam_authentication
]
enabled
=
yes
plugins/functions/fmod_pam_authentication.py
0 → 100644
View file @
985a02fc
import
os
from
settingsd
import
const
from
settingsd
import
config
from
settingsd
import
service
from
settingsd
import
shared
from
pam
import
pam
SERVICE_NAME
=
"pam_authentication"
class
PamAuthentication
(
service
.
FunctionObject
)
:
@service.functionMethod
(
"pam"
,
in_signature
=
"ss"
,
out_signature
=
"b"
)
def
authenticate
(
self
,
login
,
password
):
authenticator
=
pam
()
return
authenticator
.
authenticate
(
login
,
password
)
class
Service
(
service
.
Service
)
:
def
initService
(
self
):
shared
.
Functions
.
addSharedObject
(
SERVICE_NAME
,
PamAuthentication
(
SERVICE_NAME
,
self
))
@classmethod
def
serviceName
(
self
):
return
SERVICE_NAME
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