Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
626a62e5
Commit
626a62e5
authored
Jun 12, 2016
by
Mario Weigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-10214: Fix segfault when using groups in PAM user mapping plugin
parent
94b47bc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
plugin/auth_pam/mapper/pam_user_map.c
plugin/auth_pam/mapper/pam_user_map.c
+3
-2
No files found.
plugin/auth_pam/mapper/pam_user_map.c
View file @
626a62e5
...
...
@@ -71,6 +71,7 @@ static int populate_user_groups(const char *user, gid_t **groups)
static
int
user_in_group
(
const
gid_t
*
user_groups
,
int
ng
,
const
char
*
group
)
{
gid_t
group_id
;
const
gid_t
*
groups_end
=
user_groups
+
ng
;
{
struct
group
*
g
=
getgrnam
(
group
);
...
...
@@ -79,7 +80,7 @@ static int user_in_group(const gid_t *user_groups, int ng,const char *group)
group_id
=
g
->
gr_gid
;
}
for
(;
user_groups
<
user_groups
+
ng
;
user_groups
++
)
for
(;
user_groups
<
groups_end
;
user_groups
++
)
{
if
(
*
user_groups
==
group_id
)
return
1
;
...
...
@@ -146,7 +147,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
goto
ret
;
}
}
pam_err
=
PAM_
SUCCESS
;
pam_err
=
PAM_
AUTH_ERR
;
goto
ret
;
syntax_error:
...
...
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