Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
Christopher Ng
OpenLDAP
Commits
4ca97f41
Commit
4ca97f41
authored
22 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
uniform temporary buf sizes; use automatic buffers instead of heap
parent
8de44663
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/acl.c
+7
-8
7 additions, 8 deletions
servers/slapd/acl.c
with
7 additions
and
8 deletions
servers/slapd/acl.c
+
7
−
8
View file @
4ca97f41
...
...
@@ -17,6 +17,8 @@
#include
"sets.h"
#include
"lber_pvt.h"
#define ACL_BUF_SIZE 1024
/* use most appropriate size */
/*
* speed up compares
...
...
@@ -641,7 +643,7 @@ acl_mask(
if
(
b
->
a_dn_expand
)
{
struct
berval
bv
;
char
buf
[
1024
];
char
buf
[
ACL_BUF_SIZE
];
bv
.
bv_len
=
sizeof
(
buf
)
-
1
;
bv
.
bv_val
=
buf
;
...
...
@@ -754,7 +756,7 @@ dn_match_cleanup:;
continue
;
}
}
else
{
char
buf
[
1024
];
char
buf
[
ACL_BUF_SIZE
];
struct
berval
cmp
=
conn
->
c_peer_domain
;
struct
berval
pat
=
b
->
a_domain_pat
;
...
...
@@ -917,7 +919,7 @@ dn_match_cleanup:;
}
if
(
b
->
a_group_pat
.
bv_len
)
{
char
buf
[
1024
];
char
buf
[
ACL_BUF_SIZE
];
struct
berval
bv
;
struct
berval
ndn
=
{
0
,
NULL
};
int
rc
;
...
...
@@ -1644,7 +1646,6 @@ aci_group_member (
regmatch_t
*
matches
)
{
struct
berval
bv
;
struct
berval
subjdn
;
struct
berval
grpoc
;
struct
berval
grpat
;
...
...
@@ -1676,15 +1677,13 @@ aci_group_member (
grp_oc
=
oc_bvfind
(
&
grpoc
);
if
(
grp_oc
!=
NULL
&&
grp_ad
!=
NULL
)
{
struct
berval
ndn
;
bv
.
bv_val
=
(
char
*
)
ch_malloc
(
1024
);
bv
.
bv_len
=
1024
;
char
buf
[
ACL_BUF_SIZE
];
struct
berval
bv
=
{
sizeof
(
buf
),
buf
},
ndn
;
string_expand
(
&
bv
,
&
subjdn
,
e
->
e_ndn
,
matches
);
if
(
dnNormalize2
(
NULL
,
&
bv
,
&
ndn
)
==
LDAP_SUCCESS
)
{
rc
=
(
backend_group
(
be
,
conn
,
op
,
e
,
&
ndn
,
&
op
->
o_ndn
,
grp_oc
,
grp_ad
)
==
0
);
free
(
ndn
.
bv_val
);
}
ch_free
(
bv
.
bv_val
);
}
done:
...
...
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