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
9f14fd58
Commit
9f14fd58
authored
11 hours ago
by
jan.koester
Browse files
Options
Downloads
Patches
Plain Diff
fixed session.cpp
parent
e11addf7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#162
failed
10 hours ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/authdb.cpp
+7
-10
7 additions, 10 deletions
src/authdb.cpp
src/user.cpp
+2
-3
2 additions, 3 deletions
src/user.cpp
with
9 additions
and
13 deletions
src/authdb.cpp
+
7
−
10
View file @
9f14fd58
...
...
@@ -424,19 +424,16 @@ VALUEFOUND:
bool
getRecord
(
authdb
::
AuthBackend
&
backend
,
AuthData
&
rec
,
int
type
){
bool
found
=
false
;
int
rd
=
sizeof
(
authdb
::
AuthHeader
),
end
=
backend
.
end
();
AuthData
*
curec
=&
rec
;
while
(
rd
<
end
){
AuthData
::
Record
cur
;
memset
(
&
cur
,
0
,
sizeof
(
AuthData
::
Record
));
std
::
shared_ptr
<
AuthData
::
Record
>
cur
(
new
AuthData
::
Record
());
backend
.
setPos
(
rd
);
backend
.
read
((
unsigned
char
*
)
&
cur
,
sizeof
(
AuthData
::
Record
));
rd
=
backend
.
getPos
()
+
cur
.
datasize
;
if
(
uuid_compare
(
cur
.
uuid
,
rec
.
Data
->
uuid
)
==
0
&&
cur
.
type
==
type
){
cur
.
data
=
new
char
[
cur
.
datasize
];
backend
.
read
((
unsigned
char
*
)
cur
.
data
,
cur
.
datasize
);
rec
.
append
(
cur
);
delete
[]
cur
.
data
;
backend
.
read
(
reinterpret_cast
<
unsigned
char
*>
(
cur
.
get
()),
sizeof
(
AuthData
::
Record
));
rd
=
backend
.
getPos
()
+
cur
->
datasize
;
if
(
uuid_compare
(
cur
->
uuid
,
rec
.
Data
->
uuid
)
==
0
&&
cur
->
type
==
type
){
cur
->
data
=
new
char
[
cur
->
datasize
];
backend
.
read
((
unsigned
char
*
)
cur
->
data
,
cur
->
datasize
);
rec
.
append
(
*
cur
);
found
=
true
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/user.cpp
+
2
−
3
View file @
9f14fd58
...
...
@@ -167,9 +167,9 @@ void authdb::User::info(AuthBackend &backend, class UserData& dat, size_t &pos){
throw
AuthBackendError
(
"user info uid required!"
);
while
(
pos
<
end
){
authdb
::
AuthData
::
Record
*
cur
=
new
AuthData
::
Record
;
std
::
shared_ptr
<
authdb
::
AuthData
::
Record
>
cur
(
new
AuthData
::
Record
)
;
backend
.
setPos
(
pos
);
backend
.
read
(
(
unsigned
char
*
)
cur
,
sizeof
(
AuthData
::
Record
));
backend
.
read
(
reinterpret_cast
<
unsigned
char
*
>
(
cur
.
get
())
,
sizeof
(
AuthData
::
Record
));
pos
=
backend
.
getPos
()
+
cur
->
datasize
;
if
(
cur
->
type
==
UserData
&&
uuid_compare
(
dat
.
uid
,
cur
->
uuid
)
==
0
&&
strcmp
(
cur
->
fieldname
,
"username"
)
==
0
...
...
@@ -192,7 +192,6 @@ void authdb::User::info(AuthBackend &backend, class UserData& dat, size_t &pos){
dat
.
avatar
=
dat
.
Data
;
}
}
delete
cur
;
}
}
...
...
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