Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Robert Dubner
OpenLDAP
Commits
d7884b58
Commit
d7884b58
authored
Apr 14, 2004
by
Pierangelo Masarati
Browse files
rename macro
parent
e46e44c3
Changes
3
Hide whitespace changes
Inline
Side-by-side
servers/slapd/config.c
View file @
d7884b58
...
...
@@ -687,7 +687,7 @@ read_config( const char *fname, int depth )
}
else
if
(
strncasecmp
(
cargv
[
0
],
"sasl"
,
4
)
==
0
)
{
if
(
slap_sasl_config
(
cargc
,
cargv
,
line
,
fname
,
lineno
)
)
return
1
;
#ifdef SLAP_
X_
SASL_REWRITE
#ifdef SLAP_SASL_REWRITE
/* use authid rewrite instead of sasl regexp */
}
else
if
(
strncasecmp
(
cargv
[
0
],
"authid-rewrite"
,
sizeof
(
"authid-rewrite"
)
-
1
)
==
0
)
{
int
rc
=
slap_sasl_rewrite_config
(
fname
,
lineno
,
...
...
@@ -695,7 +695,7 @@ read_config( const char *fname, int depth )
if
(
rc
)
{
return
rc
;
}
#endif
/* SLAP_
X_
SASL_REWRITE */
#endif
/* SLAP_SASL_REWRITE */
}
else
if
(
strcasecmp
(
cargv
[
0
],
"schemadn"
)
==
0
)
{
struct
berval
dn
;
...
...
servers/slapd/proto-slap.h
View file @
d7884b58
...
...
@@ -1010,13 +1010,13 @@ LDAP_SLAPD_F (int) slap_sasl_authorized LDAP_P((
LDAP_SLAPD_F
(
int
)
slap_sasl_regexp_config
LDAP_P
((
const
char
*
match
,
const
char
*
replace
));
LDAP_SLAPD_F
(
int
)
slap_sasl_setpolicy
LDAP_P
((
const
char
*
));
#ifdef SLAP_
X_
SASL_REWRITE
#ifdef SLAP_SASL_REWRITE
LDAP_SLAPD_F
(
int
)
slap_sasl_rewrite_config
LDAP_P
((
const
char
*
fname
,
int
lineno
,
int
argc
,
char
**
argv
));
#endif
/* SLAP_
X_
SASL_REWRITE */
#endif
/* SLAP_SASL_REWRITE */
/*
* schema.c
...
...
servers/slapd/saslauthz.c
View file @
d7884b58
...
...
@@ -73,11 +73,11 @@ typedef struct sasl_regexp {
static
int
nSaslRegexp
=
0
;
static
SaslRegexp_t
*
SaslRegexp
=
NULL
;
#ifdef SLAP_
X_
SASL_REWRITE
#ifdef SLAP_SASL_REWRITE
#include
"rewrite.h"
struct
rewrite_info
*
sasl_rwinfo
=
NULL
;
#define AUTHID_CONTEXT "authid"
#endif
/* SLAP_
X_
SASL_REWRITE */
#endif
/* SLAP_SASL_REWRITE */
/* What SASL proxy authorization policies are allowed? */
#define SASL_AUTHZ_NONE 0x00
...
...
@@ -406,7 +406,7 @@ static int slap_sasl_rx_off(char *rep, int *off)
return
(
LDAP_SUCCESS
);
}
#ifdef SLAP_
X_
SASL_REWRITE
#ifdef SLAP_SASL_REWRITE
int
slap_sasl_rewrite_config
(
const
char
*
fname
,
int
lineno
,
...
...
@@ -493,14 +493,14 @@ int slap_sasl_regexp_rewrite_config(
return
rc
;
}
#endif
/* SLAP_
X_
SASL_REWRITE */
#endif
/* SLAP_SASL_REWRITE */
int
slap_sasl_regexp_config
(
const
char
*
match
,
const
char
*
replace
)
{
#ifdef SLAP_
X_
SASL_REWRITE
#ifdef SLAP_SASL_REWRITE
return
slap_sasl_regexp_rewrite_config
(
"sasl-regexp"
,
0
,
match
,
replace
,
AUTHID_CONTEXT
);
#else
/* ! SLAP_
X_
SASL_REWRITE */
#else
/* ! SLAP_SASL_REWRITE */
int
rc
;
SaslRegexp_t
*
reg
;
...
...
@@ -533,7 +533,7 @@ int slap_sasl_regexp_config( const char *match, const char *replace )
nSaslRegexp
++
;
return
(
LDAP_SUCCESS
);
#endif
/* ! SLAP_
X_
SASL_REWRITE */
#endif
/* ! SLAP_SASL_REWRITE */
}
/* Perform replacement on regexp matches */
...
...
@@ -595,7 +595,7 @@ static void slap_sasl_rx_exp(
static
int
slap_sasl_regexp
(
struct
berval
*
in
,
struct
berval
*
out
,
int
flags
,
void
*
ctx
)
{
#ifdef SLAP_
X_
SASL_REWRITE
#ifdef SLAP_SASL_REWRITE
const
char
*
context
=
AUTHID_CONTEXT
;
if
(
sasl_rwinfo
==
NULL
||
BER_BVISNULL
(
in
)
)
{
...
...
@@ -632,7 +632,7 @@ static int slap_sasl_regexp( struct berval *in, struct berval *out,
return
0
;
}
#else
/* ! SLAP_
X_
SASL_REWRITE */
#else
/* ! SLAP_SASL_REWRITE */
char
*
saslname
=
in
->
bv_val
;
SaslRegexp_t
*
reg
;
regmatch_t
sr_strings
[
SASLREGEX_REPLACE
];
/* strings matching $1,$2 ... */
...
...
@@ -680,7 +680,7 @@ static int slap_sasl_regexp( struct berval *in, struct berval *out,
#endif
return
(
1
);
#endif
/* ! SLAP_
X_
SASL_REWRITE */
#endif
/* ! SLAP_SASL_REWRITE */
}
/* This callback actually does some work...*/
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment