Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
authdb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jan.koester
authdb
Commits
3b03bad6
Commit
3b03bad6
authored
13 hours ago
by
jan.koester
Browse files
Options
Downloads
Patches
Plain Diff
fixed session.cpp
parent
98326ee9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#148
canceled
12 hours ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/session.cpp
+6
-8
6 additions, 8 deletions
src/session.cpp
with
6 additions
and
8 deletions
src/session.cpp
+
6
−
8
View file @
3b03bad6
...
@@ -103,10 +103,9 @@ const authdb::SessionData * authdb::Session::addSession(AuthBackend &backend,uui
...
@@ -103,10 +103,9 @@ const authdb::SessionData * authdb::Session::addSession(AuthBackend &backend,uui
if
(
cur
.
type
==
UserData
&&
strcmp
(
cur
.
fieldname
,
"username"
)
==
0
if
(
cur
.
type
==
UserData
&&
strcmp
(
cur
.
fieldname
,
"username"
)
==
0
&&
uuid_compare
(
cur
.
uuid
,
userid
)
==
0
){
&&
uuid_compare
(
cur
.
uuid
,
userid
)
==
0
){
char
*
tmp
=
new
char
[
cur
.
datasize
];
std
::
shared_ptr
<
unsigned
char
>
tmp
(
new
unsigned
char
[
cur
.
datasize
]);
backend
.
read
((
unsigned
char
*
)
tmp
,
cur
.
datasize
);
backend
.
read
(
tmp
.
get
(),
cur
.
datasize
);
username
=
tmp
;
username
=
reinterpret_cast
<
char
*>
(
tmp
.
get
());
delete
[]
tmp
;
}
}
}
}
...
@@ -214,10 +213,9 @@ void authdb::Session::relSession(AuthBackend &backend,uuid_t sessionid){
...
@@ -214,10 +213,9 @@ void authdb::Session::relSession(AuthBackend &backend,uuid_t sessionid){
if
(
cur
.
type
==
UserData
&&
strcmp
(
cur
.
fieldname
,
"username"
)
==
0
if
(
cur
.
type
==
UserData
&&
strcmp
(
cur
.
fieldname
,
"username"
)
==
0
&&
uuid_compare
(
cur
.
uuid
,
cursess
->
_uid
)
==
0
){
&&
uuid_compare
(
cur
.
uuid
,
cursess
->
_uid
)
==
0
){
char
*
tmp
=
new
char
[
cur
.
datasize
];
std
::
shared_ptr
<
unsigned
char
>
tmp
(
new
unsigned
char
[
cur
.
datasize
]);
backend
.
read
(
reinterpret_cast
<
unsigned
char
*>
(
tmp
),
cur
.
datasize
);
backend
.
read
(
tmp
.
get
(),
cur
.
datasize
);
username
=
tmp
;
username
=
reinterpret_cast
<
char
*>
(
tmp
.
get
());
delete
[]
tmp
;
}
}
if
(
cur
.
type
==
GroupData
&&
strcmp
(
cur
.
fieldname
,
"groupname"
)
==
0
){
if
(
cur
.
type
==
GroupData
&&
strcmp
(
cur
.
fieldname
,
"groupname"
)
==
0
){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment