Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-module-privacyidea-pam
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
0
Merge Requests
0
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
Eugene Omelyanovich
python-module-privacyidea-pam
Commits
da636a4e
Commit
da636a4e
authored
Feb 15, 2018
by
Friedrich Weber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic Changes
parent
53df44a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
privacyidea_pam.py
privacyidea_pam.py
+5
-3
No files found.
privacyidea_pam.py
View file @
da636a4e
...
...
@@ -127,10 +127,12 @@ class Authenticator(object):
if
result
.
get
(
"value"
):
save_auth_item
(
self
.
sqlfile
,
self
.
user
,
serial
,
tokentype
,
auth_item
)
return
True
else
:
syslog
.
syslog
(
syslog
.
LOG_ERR
,
"
%
s:
%
s"
%
(
__name__
,
result
.
get
(
"error"
)
.
get
(
"message"
)))
return
False
def
authenticate
(
self
,
password
):
rval
=
self
.
pamh
.
PAM_SYSTEM_ERR
...
...
@@ -454,7 +456,7 @@ def save_auth_item(sqlfile, user, serial, tokentype, authitem):
# delete old refilltoken
try
:
c
.
execute
(
'DELETE FROM refilltokens WHERE serial=?'
,
(
serial
,))
except
:
except
sqlite3
.
OperationalError
:
pass
c
.
execute
(
"INSERT INTO refilltokens (serial, refilltoken) VALUES (?,?)"
,
(
serial
,
refilltoken
))
...
...
@@ -476,12 +478,12 @@ def _create_table(c):
c
.
execute
(
"CREATE TABLE authitems "
"(counter int, user text, serial text, tokenowner text,"
"otp text, tokentype text)"
)
except
:
except
sqlite3
.
OperationalError
:
pass
try
:
# create refilltokens table
c
.
execute
(
"CREATE TABLE refilltokens (serial text, refilltoken text)"
)
except
:
except
sqlite3
.
OperationalError
:
pass
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