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
52a354f7
Commit
52a354f7
authored
Dec 27, 2001
by
Kurt Zeilenga
Browse files
Mark more stuff as deprecated and remove some unused deprecated
routines.
parent
b17572c7
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/ldap.h
View file @
52a354f7
...
...
@@ -1271,33 +1271,33 @@ ldap_next_attribute LDAP_P((
/*
* in getvalues.c
*/
LDAP_F
(
char
**
)
ldap_get_values
LDAP_P
((
LDAP
*
ld
,
LDAPMessage
*
entry
,
LDAP_CONST
char
*
target
));
LDAP_F
(
struct
berval
**
)
ldap_get_values_len
LDAP_P
((
LDAP
*
ld
,
LDAPMessage
*
entry
,
LDAP_CONST
char
*
target
));
LDAP_F
(
int
)
ldap_count_values
LDAP_P
((
char
**
vals
));
LDAP_F
(
int
)
ldap_count_values_len
LDAP_P
((
struct
berval
**
vals
));
LDAP_F
(
void
)
ldap_value_free
LDAP_P
((
ldap_value_free_len
LDAP_P
((
struct
berval
**
vals
));
LDAP_F
(
char
**
)
ldap_get_values
LDAP_P
((
/* deprecated */
LDAP
*
ld
,
LDAPMessage
*
entry
,
LDAP_CONST
char
*
target
));
LDAP_F
(
int
)
ldap_count_values
LDAP_P
((
/* deprecated */
char
**
vals
));
LDAP_F
(
void
)
ldap_value_free
_len
LDAP_P
((
struct
berval
**
vals
));
ldap_value_free
LDAP_P
((
/* deprecated */
char
**
vals
));
/*
* in result.c:
...
...
@@ -1473,16 +1473,17 @@ ldap_mods_free LDAP_P((
/*
* in sort.c
* (deprecated)
*/
typedef
int
(
LDAP_SORT_AD_CMP_PROC
)
LDAP_P
((
typedef
int
(
LDAP_SORT_AD_CMP_PROC
)
LDAP_P
((
/* deprecated */
LDAP_CONST
char
*
left
,
LDAP_CONST
char
*
right
));
typedef
int
(
LDAP_SORT_AV_CMP_PROC
)
LDAP_P
((
typedef
int
(
LDAP_SORT_AV_CMP_PROC
)
LDAP_P
((
/* deprecated */
LDAP_CONST
void
*
left
,
LDAP_CONST
void
*
right
));
LDAP_F
(
int
)
LDAP_F
(
int
)
/* deprecated */
ldap_sort_entries
LDAP_P
((
LDAP
*
ld
,
LDAPMessage
**
chain
,
LDAP_CONST
char
*
attr
,
...
...
@@ -1528,27 +1529,6 @@ LDAP_F( void )
ldap_free_urldesc
LDAP_P
((
LDAPURLDesc
*
ludp
));
LDAP_F
(
int
)
ldap_url_search
LDAP_P
((
LDAP
*
ld
,
LDAP_CONST
char
*
url
,
int
attrsonly
));
LDAP_F
(
int
)
ldap_url_search_s
LDAP_P
((
LDAP
*
ld
,
LDAP_CONST
char
*
url
,
int
attrsonly
,
LDAPMessage
**
res
));
LDAP_F
(
int
)
ldap_url_search_st
LDAP_P
((
LDAP
*
ld
,
LDAP_CONST
char
*
url
,
int
attrsonly
,
struct
timeval
*
timeout
,
LDAPMessage
**
res
));
/*
* in sortctrl.c
*/
...
...
include/ldap_pvt.h
View file @
52a354f7
...
...
@@ -102,7 +102,6 @@ ldap_charray2str LDAP_P((
/* url.c */
LDAP_F
(
void
)
ldap_pvt_hex_unescape
LDAP_P
((
char
*
s
));
LDAP_F
(
int
)
ldap_pvt_unhex
(
int
c
);
/*
* these macros assume 'x' is an ASCII x
...
...
libraries/libldap/test.c
View file @
52a354f7
...
...
@@ -607,19 +607,6 @@ main( int argc, char **argv )
timeout
.
tv_sec
=
atoi
(
line
);
break
;
case
'l'
:
/* URL search */
getline
(
line
,
sizeof
(
line
),
stdin
,
"attrsonly (0=attrs&values, 1=attrs only)? "
);
attrsonly
=
atoi
(
line
);
getline
(
line
,
sizeof
(
line
),
stdin
,
"LDAP URL? "
);
if
((
id
=
ldap_url_search
(
ld
,
line
,
attrsonly
))
==
-
1
)
{
ldap_perror
(
ld
,
"ldap_url_search"
);
}
else
{
printf
(
"URL search initiated with id %d
\n
"
,
id
);
}
break
;
case
'p'
:
/* parse LDAP URL */
getline
(
line
,
sizeof
(
line
),
stdin
,
"LDAP URL? "
);
if
((
i
=
ldap_url_parse
(
line
,
&
ludp
))
!=
0
)
{
...
...
libraries/libldap/url.c
View file @
52a354f7
...
...
@@ -1115,91 +1115,14 @@ ldap_free_urldesc( LDAPURLDesc *ludp )
LDAP_FREE
(
ludp
);
}
int
ldap_url_search
(
LDAP
*
ld
,
LDAP_CONST
char
*
url
,
int
attrsonly
)
static
int
ldap_int_unhex
(
int
c
)
{
int
err
;
LDAPURLDesc
*
ludp
;
BerElement
*
ber
;
LDAPreqinfo
bind
;
assert
(
ld
!=
NULL
);
assert
(
LDAP_VALID
(
ld
)
);
if
(
ldap_url_parse
(
url
,
&
ludp
)
!=
0
)
{
ld
->
ld_errno
=
LDAP_PARAM_ERROR
;
return
(
-
1
);
}
if
(
ludp
->
lud_crit_exts
)
{
/* we don't support any extension (yet) */
ld
->
ld_errno
=
LDAP_NOT_SUPPORTED
;
return
(
-
1
);
}
ber
=
ldap_build_search_req
(
ld
,
ludp
->
lud_dn
,
ludp
->
lud_scope
,
ludp
->
lud_filter
,
ludp
->
lud_attrs
,
attrsonly
,
NULL
,
NULL
,
-
1
,
-
1
);
if
(
ber
==
NULL
)
{
err
=
-
1
;
}
else
{
bind
.
ri_request
=
LDAP_REQ_SEARCH
;
bind
.
ri_msgid
=
ld
->
ld_msgid
;
bind
.
ri_url
=
(
char
*
)
url
;
err
=
ldap_send_server_request
(
ld
,
ber
,
ld
->
ld_msgid
,
NULL
,
ludp
,
NULL
,
&
bind
);
}
ldap_free_urldesc
(
ludp
);
return
(
err
);
}
int
ldap_url_search_st
(
LDAP
*
ld
,
LDAP_CONST
char
*
url
,
int
attrsonly
,
struct
timeval
*
timeout
,
LDAPMessage
**
res
)
{
int
msgid
;
if
((
msgid
=
ldap_url_search
(
ld
,
url
,
attrsonly
))
==
-
1
)
{
return
(
ld
->
ld_errno
);
}
if
(
ldap_result
(
ld
,
msgid
,
1
,
timeout
,
res
)
==
-
1
)
{
return
(
ld
->
ld_errno
);
}
if
(
ld
->
ld_errno
==
LDAP_TIMEOUT
)
{
(
void
)
ldap_abandon
(
ld
,
msgid
);
ld
->
ld_errno
=
LDAP_TIMEOUT
;
return
(
ld
->
ld_errno
);
}
return
(
ldap_result2error
(
ld
,
*
res
,
0
));
}
int
ldap_url_search_s
(
LDAP
*
ld
,
LDAP_CONST
char
*
url
,
int
attrsonly
,
LDAPMessage
**
res
)
{
int
msgid
;
if
((
msgid
=
ldap_url_search
(
ld
,
url
,
attrsonly
))
==
-
1
)
{
return
(
ld
->
ld_errno
);
}
if
(
ldap_result
(
ld
,
msgid
,
1
,
(
struct
timeval
*
)
NULL
,
res
)
==
-
1
)
{
return
(
ld
->
ld_errno
);
}
return
(
ldap_result2error
(
ld
,
*
res
,
0
));
return
(
c
>=
'0'
&&
c
<=
'9'
?
c
-
'0'
:
c
>=
'A'
&&
c
<=
'F'
?
c
-
'A'
+
10
:
c
-
'a'
+
10
);
}
void
ldap_pvt_hex_unescape
(
char
*
s
)
{
...
...
@@ -1212,10 +1135,10 @@ ldap_pvt_hex_unescape( char *s )
for
(
p
=
s
;
*
s
!=
'\0'
;
++
s
)
{
if
(
*
s
==
'%'
)
{
if
(
*++
s
!=
'\0'
)
{
*
p
=
ldap_
pv
t_unhex
(
*
s
)
<<
4
;
*
p
=
ldap_
in
t_unhex
(
*
s
)
<<
4
;
}
if
(
*++
s
!=
'\0'
)
{
*
p
++
+=
ldap_
pv
t_unhex
(
*
s
);
*
p
++
+=
ldap_
in
t_unhex
(
*
s
);
}
}
else
{
*
p
++
=
*
s
;
...
...
@@ -1226,10 +1149,3 @@ ldap_pvt_hex_unescape( char *s )
}
int
ldap_pvt_unhex
(
int
c
)
{
return
(
c
>=
'0'
&&
c
<=
'9'
?
c
-
'0'
:
c
>=
'A'
&&
c
<=
'F'
?
c
-
'A'
+
10
:
c
-
'a'
+
10
);
}
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