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
00368b12
Commit
00368b12
authored
17 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
log formatOID, possibly mapped to friendly name if known
parent
83eec9f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/ldap.h
+6
-0
6 additions, 0 deletions
include/ldap.h
servers/slapd/controls.c
+26
-4
26 additions, 4 deletions
servers/slapd/controls.c
with
32 additions
and
4 deletions
include/ldap.h
+
6
−
0
View file @
00368b12
...
...
@@ -297,6 +297,12 @@ typedef struct ldapcontrol {
#ifdef LDAP_DEVEL
/* <draft-wahl-ldap-session> */
#define LDAP_CONTROL_X_SESSION_TRACKING "1.3.6.1.4.1.21008.108.63.1"
#define LDAP_CONTROL_X_SESSION_TRACKING_RADIUS_ACCT_SESSION_ID \
LDAP_CONTROL_X_SESSION_TRACKING ".1"
#define LDAP_CONTROL_X_SESSION_TRACKING_RADIUS_ACCT_MULTI_SESSION_ID \
LDAP_CONTROL_X_SESSION_TRACKING ".2"
#define LDAP_CONTROL_X_SESSION_TRACKING_USERNAME \
LDAP_CONTROL_X_SESSION_TRACKING ".3"
#endif
/* LDAP_DEVEL */
/* various expired works */
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/controls.c
+
26
−
4
View file @
00368b12
...
...
@@ -1606,6 +1606,17 @@ static int parseSearchOptions (
}
#ifdef SLAP_CONTROL_X_SESSION_TRACKING
struct
berval
session_tracking_formats
[]
=
{
BER_BVC
(
"LDAP_CONTROL_X_SESSION_TRACKING_RADIUS_ACCT_SESSION_ID"
),
BER_BVC
(
"RADIUS-Acct-Session-Id"
),
BER_BVC
(
LDAP_CONTROL_X_SESSION_TRACKING_RADIUS_ACCT_MULTI_SESSION_ID
),
BER_BVC
(
"RADIUS-Acct-Multi-Session-Id"
),
BER_BVC
(
LDAP_CONTROL_X_SESSION_TRACKING_USERNAME
),
BER_BVC
(
"USERNAME"
),
BER_BVNULL
};
static
int
parseSessionTracking
(
Operation
*
op
,
SlapReply
*
rs
,
...
...
@@ -1614,7 +1625,7 @@ static int parseSessionTracking(
BerElement
*
ber
;
ber_tag_t
tag
;
ber_len_t
len
;
int
rc
;
int
i
,
rc
;
struct
berval
sessionSourceIp
=
BER_BVNULL
,
sessionSourceName
=
BER_BVNULL
,
...
...
@@ -1723,6 +1734,14 @@ static int parseSessionTracking(
goto
error
;
}
for
(
i
=
0
;
!
BER_BVISNULL
(
&
session_tracking_formats
[
i
]
);
i
+=
2
)
{
if
(
bvmatch
(
&
formatOID
,
&
session_tracking_formats
[
i
]
)
)
{
formatOID
=
session_tracking_formats
[
i
+
1
];
break
;
}
}
/* sessionTrackingIdentifier */
tag
=
ber_peek_tag
(
ber
,
&
len
);
if
(
tag
==
LBER_DEFAULT
)
{
...
...
@@ -1739,7 +1758,8 @@ static int parseSessionTracking(
}
if
(
ldif_is_not_printable
(
sessionTrackingIdentifier
.
bv_val
,
sessionTrackingIdentifier
.
bv_len
)
)
{
BER_BVZERO
(
&
sessionTrackingIdentifier
);
/* we want the OID printed, at least */
BER_BVSTR
(
&
sessionTrackingIdentifier
,
""
);
}
/* closure */
...
...
@@ -1758,7 +1778,8 @@ static int parseSessionTracking(
}
if
(
!
BER_BVISNULL
(
&
sessionTrackingIdentifier
)
)
{
if
(
st_len
)
st_len
++
;
st_len
+=
STRLENOF
(
"ID="
)
+
sessionTrackingIdentifier
.
bv_len
;
st_len
+=
formatOID
.
bv_len
+
STRLENOF
(
"="
)
+
sessionTrackingIdentifier
.
bv_len
;
}
if
(
st_len
==
0
)
{
...
...
@@ -1789,7 +1810,8 @@ static int parseSessionTracking(
if
(
!
BER_BVISNULL
(
&
sessionTrackingIdentifier
)
)
{
if
(
st_len
)
*
ptr
++
=
' '
;
ptr
=
lutil_strcopy
(
ptr
,
"ID="
);
ptr
=
lutil_strcopy
(
ptr
,
formatOID
.
bv_val
);
*
ptr
++
=
'='
;
ptr
=
lutil_strcopy
(
ptr
,
sessionTrackingIdentifier
.
bv_val
);
}
...
...
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