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
4f8996e7
Commit
4f8996e7
authored
Feb 11, 2019
by
Дмитрий Никулин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PAM configuration: separate PAM config for settingsd
parent
9a0dad9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
settingsd
configs/pam/settingsd
+4
-0
fmod_pam_authentication.py
plugins/functions/fmod_pam_authentication.py
+3
-2
No files found.
configs/pam/settingsd
0 → 100644
View file @
4f8996e7
# PAM configuration for the settingsd service
# Standard Un*x authentication.
@include common-auth
plugins/functions/fmod_pam_authentication.py
View file @
4f8996e7
...
...
@@ -7,13 +7,14 @@ from pamela import authenticate, change_password, PAMError
SERVICE_NAME
=
"pam_authentication"
PAM_SERVICE_NAME
=
"settingsd"
class
PamAuthentication
(
service
.
FunctionObject
)
:
@service.functionMethod
(
"pam"
,
in_signature
=
"ss"
,
out_signature
=
"b"
)
def
authenticate
(
self
,
login
,
password
):
try
:
authenticate
(
login
,
password
)
authenticate
(
login
,
password
,
service
=
PAM_SERVICE_NAME
)
return
True
except
PAMError
:
return
False
...
...
@@ -23,7 +24,7 @@ class PamAuthentication(service.FunctionObject) :
if
len
(
new_password
)
==
0
:
return
False
try
:
change_password
(
login
,
new_password
)
change_password
(
login
,
new_password
,
service
=
PAM_SERVICE_NAME
)
return
True
except
PAMError
as
err
:
print
(
err
)
...
...
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