Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
13af7fb0
Commit
13af7fb0
authored
Jan 15, 2002
by
Kurt Zeilenga
Browse files
Misc. cleanup, remove lint, remove unused deprecated functions, etc.
parent
5a378a5c
Changes
15
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-bdb/idl.c
View file @
13af7fb0
...
...
@@ -263,8 +263,8 @@ bdb_idl_fetch_key(
data
.
flags
=
DB_DBT_USERMEM
;
/* fetch it */
rc
=
db
->
get
(
db
,
tid
,
key
,
&
data
,
bdb
->
bi_db_opflags
);
#endif
if
(
rc
==
DB_NOTFOUND
)
{
return
rc
;
...
...
servers/slapd/back-bdb/index.c
View file @
13af7fb0
...
...
@@ -71,7 +71,6 @@ int bdb_index_is_indexed(
Backend
*
be
,
AttributeDescription
*
desc
)
{
int
rc
;
slap_mask_t
mask
;
char
*
dbname
;
struct
berval
prefix
;
...
...
@@ -82,7 +81,7 @@ int bdb_index_is_indexed(
return
LDAP_INAPPROPRIATE_MATCHING
;
}
return
LDAP_SUCCESS
;
return
LDAP_SUCCESS
;
}
int
bdb_index_param
(
...
...
servers/slapd/back-bdb/init.c
View file @
13af7fb0
...
...
@@ -391,6 +391,7 @@ bdb_initialize(
{
static
char
*
controls
[]
=
{
LDAP_CONTROL_MANAGEDSAIT
,
LDAP_CONTROL_SUBENTRIES
,
NULL
};
...
...
servers/slapd/back-ldbm/idl.c
View file @
13af7fb0
...
...
@@ -165,7 +165,8 @@ idl_fetch(
Datum
data
;
ID_BLOCK
*
idl
;
ID_BLOCK
**
tmp
;
int
i
,
nids
;
int
nids
;
unsigned
i
;
idl
=
idl_fetch_one
(
be
,
db
,
key
);
...
...
servers/slapd/back-ldbm/index.c
View file @
13af7fb0
...
...
@@ -68,7 +68,6 @@ int index_is_indexed(
Backend
*
be
,
AttributeDescription
*
desc
)
{
int
rc
;
slap_mask_t
mask
;
char
*
dbname
;
struct
berval
prefix
;
...
...
@@ -79,7 +78,7 @@ int index_is_indexed(
return
LDAP_INAPPROPRIATE_MATCHING
;
}
return
LDAP_SUCCESS
;
return
LDAP_SUCCESS
;
}
int
index_param
(
...
...
servers/slapd/config.c
View file @
13af7fb0
...
...
@@ -77,7 +77,7 @@ read_config( const char *fname )
int
rc
;
struct
berval
vals
[
2
];
static
int
lastmod
=
ON
;
static
int
lastmod
=
1
;
static
BackendInfo
*
bi
=
NULL
;
static
BackendDB
*
be
=
NULL
;
...
...
@@ -1996,13 +1996,13 @@ read_config( const char *fname )
if
(
be
)
{
be
->
be_flags
&=
~
SLAP_BFLAG_NOLASTMOD
;
}
else
{
lastmod
=
ON
;
lastmod
=
1
;
}
}
else
{
if
(
be
)
{
be
->
be_flags
|=
SLAP_BFLAG_NOLASTMOD
;
}
else
{
lastmod
=
OFF
;
lastmod
=
0
;
}
}
...
...
servers/slapd/dn.c
View file @
13af7fb0
...
...
@@ -735,7 +735,7 @@ dnExtractRdn(
}
/*
* FIXME: should be replaced by dnExtractRdn()
(together with dn_rdn)
* FIXME: should be replaced by dnExtractRdn()
*/
int
dn_rdnlen
(
...
...
@@ -768,60 +768,6 @@ dn_rdnlen(
return
p
-
dn_in
->
bv_val
;
}
/*
* FIXME: should be replaced by dnExtractRdn() (together with dn_rdnlen)
*/
char
*
dn_rdn
(
Backend
*
be
,
struct
berval
*
dn_in
)
{
struct
berval
rdn
;
assert
(
dn_in
);
if
(
dn_in
==
NULL
)
{
return
NULL
;
}
if
(
!
dn_in
->
bv_len
)
{
return
NULL
;
}
if
(
be
!=
NULL
&&
be_issuffix
(
be
,
dn_in
->
bv_val
)
)
{
return
NULL
;
}
if
(
dnExtractRdn
(
dn_in
,
&
rdn
)
!=
LDAP_SUCCESS
)
{
return
NULL
;
}
return
rdn
.
bv_val
;
}
/*
* dn_issuffix - tells whether suffix is a suffix of dn.
* Both dn and suffix must be normalized.
* deprecated in favor of dnIsSuffix()
*/
int
dn_issuffix
(
const
char
*
dn
,
const
char
*
suffix
)
{
struct
berval
bvdn
,
bvsuffix
;
assert
(
dn
);
assert
(
suffix
);
bvdn
.
bv_val
=
(
char
*
)
dn
;
bvdn
.
bv_len
=
strlen
(
dn
);
bvsuffix
.
bv_val
=
(
char
*
)
suffix
;
bvsuffix
.
bv_len
=
strlen
(
suffix
);
return
dnIsSuffix
(
&
bvdn
,
&
bvsuffix
);
}
/* rdn_attr_type:
*
* Given a string (i.e. an rdn) of the form:
...
...
servers/slapd/proto-slap.h
View file @
13af7fb0
...
...
@@ -401,9 +401,7 @@ LDAP_SLAPD_F (int) rdnValidate LDAP_P(( struct berval * rdn ));
LDAP_SLAPD_F
(
char
*
)
dn_validate
LDAP_P
((
char
*
dn
));
LDAP_SLAPD_F
(
char
*
)
dn_normalize
LDAP_P
((
char
*
dn
));
LDAP_SLAPD_F
(
char
*
)
dn_parent
LDAP_P
((
Backend
*
be
,
const
char
*
dn
));
LDAP_SLAPD_F
(
char
*
)
dn_rdn
LDAP_P
((
Backend
*
be
,
struct
berval
*
dn
));
LDAP_SLAPD_F
(
int
)
dn_rdnlen
LDAP_P
((
Backend
*
be
,
struct
berval
*
dn
));
LDAP_SLAPD_F
(
int
)
dn_issuffix
LDAP_P
((
const
char
*
dn
,
const
char
*
suffix
));
LDAP_SLAPD_F
(
char
*
)
rdn_attr_value
LDAP_P
((
const
char
*
rdn
));
LDAP_SLAPD_F
(
char
*
)
rdn_attr_type
LDAP_P
((
const
char
*
rdn
));
LDAP_SLAPD_F
(
int
)
rdn_attrs
LDAP_P
((
const
char
*
rdn
,
...
...
@@ -1067,7 +1065,6 @@ LDAP_SLAPD_F (int) do_extended LDAP_P((Connection *conn, Operation *op));
LDAP_SLAPD_V
(
ber_socket_t
)
dtblsize
;
LDAP_END_DECL
#endif
/* _proto_slap */
...
...
servers/slapd/schema_prep.c
View file @
13af7fb0
...
...
@@ -190,6 +190,7 @@ static AttributeTypeSchemaCheckFN rootDseAttribute;
static
AttributeTypeSchemaCheckFN
aliasAttribute
;
static
AttributeTypeSchemaCheckFN
referralAttribute
;
static
AttributeTypeSchemaCheckFN
subentryAttribute
;
static
AttributeTypeSchemaCheckFN
administrativeRoleAttribute
;
static
AttributeTypeSchemaCheckFN
dynamicAttribute
;
static
struct
slap_schema_ad_map
{
...
...
@@ -357,7 +358,7 @@ static struct slap_schema_ad_map {
"EQUALITY objectIdentifierMatch "
"USAGE directoryOperation "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )"
,
NULL
,
0
,
NULL
,
NULL
,
NULL
,
administrativeRoleAttribute
,
0
,
NULL
,
NULL
,
NULL
,
offsetof
(
struct
slap_internal_schema
,
si_ad_administrativeRole
)
},
{
"subtreeSpecification"
,
"( 2.5.18.6 NAME 'subtreeSpecification' "
"SINGLE-VALUE "
...
...
@@ -944,6 +945,28 @@ static int subentryAttribute (
return
LDAP_SUCCESS
;
}
static
int
administrativeRoleAttribute
(
Backend
*
be
,
Entry
*
e
,
Attribute
*
attr
,
const
char
**
text
,
char
*
textbuf
,
size_t
textlen
)
{
*
text
=
textbuf
;
if
(
!
SLAP_SUBENTRIES
(
be
)
)
{
snprintf
(
textbuf
,
textlen
,
"attribute
\"
%s
\"
not supported in context"
,
attr
->
a_desc
->
ad_cname
.
bv_val
);
return
LDAP_OBJECT_CLASS_VIOLATION
;
}
snprintf
(
textbuf
,
textlen
,
"attribute
\"
%s
\"
not supported!"
,
attr
->
a_desc
->
ad_cname
.
bv_val
);
return
LDAP_OBJECT_CLASS_VIOLATION
;
}
static
int
dynamicAttribute
(
Backend
*
be
,
Entry
*
e
,
...
...
servers/slapd/sets.h
View file @
13af7fb0
...
...
@@ -4,6 +4,13 @@
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#ifndef SLAP_SETS_H_
#define SLAP_SETS_H_
#include
<ldap_cdefs.h>
LDAP_BEGIN_DECL
/* this routine needs to return the bervals instead of
* plain strings, since syntax is not known. It should
* also return the syntax or some "comparison cookie"
...
...
@@ -20,3 +27,6 @@ slap_set_filter (SLAP_SET_GATHER gatherer,
void
*
cookie
,
struct
berval
*
filter
,
char
*
user
,
char
*
this
,
BerVarray
*
results
);
LDAP_END_DECL
#endif
\ No newline at end of file
servers/slapd/slap.h
View file @
13af7fb0
...
...
@@ -69,10 +69,6 @@ LDAP_BEGIN_DECL
*/
#define SLAP_MOD_SOFTADD 0x1000
#define ON (1)
#define OFF (-1)
#define UNDEFINED (0)
#define MAXREMATCHES (10)
#define SLAP_MAX_WORKER_THREADS (32)
...
...
@@ -343,7 +339,7 @@ typedef int slap_mr_filter_func LDAP_P((
typedef
struct
slap_matching_rule
{
LDAPMatchingRule
smr_mrule
;
ber_len_t
smr_oidlen
;
ber_len_t
smr_oidlen
;
slap_mask_t
smr_usage
;
#define SLAP_MR_HIDE 0x8000U
...
...
@@ -433,11 +429,11 @@ typedef struct slap_attribute_type {
struct
slap_attribute_type
*
sat_next
;
#define sat_oid sat_atype.at_oid
#define sat_names sat_atype.at_names
#define sat_desc sat_atype.at_desc
#define sat_oid
sat_atype.at_oid
#define sat_names
sat_atype.at_names
#define sat_desc
sat_atype.at_desc
#define sat_obsolete sat_atype.at_obsolete
#define sat_sup_oid sat_atype.at_sup_oid
#define sat_sup_oid
sat_atype.at_sup_oid
#define sat_equality_oid sat_atype.at_equality_oid
#define sat_ordering_oid sat_atype.at_ordering_oid
#define sat_substr_oid sat_atype.at_substr_oid
...
...
@@ -445,7 +441,7 @@ typedef struct slap_attribute_type {
#define sat_single_value sat_atype.at_single_value
#define sat_collective sat_atype.at_collective
#define sat_no_user_mod sat_atype.at_no_user_mod
#define sat_usage sat_atype.at_usage
#define sat_usage
sat_atype.at_usage
#define sat_extensions sat_atype.at_extensions
struct
slap_attr_desc
*
sat_ad
;
...
...
@@ -1357,9 +1353,6 @@ struct slap_backend_info {
#define o_tls_ssf o_authz.sai_tls_ssf
#define o_sasl_ssf o_authz.sai_sasl_ssf
struct
slap_op
;
struct
slap_conn
;
typedef
void
(
slap_response
)(
struct
slap_conn
*
,
struct
slap_op
*
,
ber_tag_t
,
ber_int_t
,
ber_int_t
,
const
char
*
,
const
char
*
,
BerVarray
,
const
char
*
,
struct
berval
*
,
...
...
servers/slapd/slapd.dsp
View file @
13af7fb0
...
...
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 advapi32.lib sasl.lib libdb
32
.lib hs_regex.lib libsasl.lib
rpcrt4.lib
ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release"
# ADD LINK32 advapi32.lib
rpcrt4.lib
sasl.lib libdb
40
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\Release"
!ELSEIF "$(CFG)" == "slapd - Win32 Debug"
...
...
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 advapi32.lib libdb
32
.lib hs_regex.lib libsasl.lib
rpcrt4.lib
ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug"
# ADD LINK32 advapi32.lib
rpcrt4.lib
libdb
40d
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug"
!ELSEIF "$(CFG)" == "slapd - Win32 Single Debug"
...
...
servers/slapd/tools/slapadd.dsp
View file @
13af7fb0
...
...
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 sasl.lib libdb
32
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release"
# ADD LINK32 sasl.lib libdb
40
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release"
!ELSEIF "$(CFG)" == "slapadd - Win32 Debug"
...
...
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 libdb
32
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug"
# ADD LINK32 libdb
40d
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug"
!ELSEIF "$(CFG)" == "slapadd - Win32 Single Debug"
...
...
servers/slapd/tools/slapcat.dsp
View file @
13af7fb0
...
...
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 sasl.lib libdb
32
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release"
# ADD LINK32 sasl.lib libdb
40
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release"
!ELSEIF "$(CFG)" == "slapcat - Win32 Debug"
...
...
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 libdb
32
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug"
# ADD LINK32 libdb
40d
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug"
!ELSEIF "$(CFG)" == "slapcat - Win32 Single Debug"
...
...
servers/slapd/tools/slapindex.dsp
View file @
13af7fb0
...
...
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 sasl.lib libdb
32
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release"
# ADD LINK32 sasl.lib libdb
40
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\Release"
!ELSEIF "$(CFG)" == "slapindex - Win32 Debug"
...
...
@@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 libdb
32
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug"
# ADD LINK32 libdb
40d
.lib hs_regex.lib libsasl.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\Debug"
!ELSEIF "$(CFG)" == "slapindex - Win32 Single Debug"
...
...
Write
Preview
Supports
Markdown
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