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
1f8e4d38
Commit
1f8e4d38
authored
Dec 27, 2001
by
Pierangelo Masarati
Browse files
cleanup
parent
02153708
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/getdn.c
View file @
1f8e4d38
...
...
@@ -177,8 +177,6 @@ ldap_explode_rdn( LDAP_CONST char *rdn, int notypes )
char
**
values
=
NULL
;
const
char
*
p
;
int
iAVA
;
unsigned
flag
=
notypes
?
LDAP_DN_FORMAT_UFN
:
LDAP_DN_FORMAT_LDAPV3
;
Debug
(
LDAP_DEBUG_TRACE
,
"ldap_explode_rdn
\n
"
,
0
,
0
,
0
);
...
...
@@ -1714,9 +1712,10 @@ hexstr2bin( const char *str, char *c )
*
c
=
c1
-
'0'
;
}
else
{
c1
=
tolower
(
c1
);
if
(
LDAP_DN_ASCII_LCASE_HEXALPHA
(
c1
)
)
{
if
(
LDAP_DN_ASCII_UCASE_HEXALPHA
(
c1
)
)
{
*
c
=
c1
-
'A'
+
10
;
}
else
{
assert
(
LDAP_DN_ASCII_LCASE_HEXALPHA
(
c1
)
);
*
c
=
c1
-
'a'
+
10
;
}
}
...
...
@@ -1727,9 +1726,10 @@ hexstr2bin( const char *str, char *c )
*
c
+=
c2
-
'0'
;
}
else
{
c2
=
tolower
(
c2
);
if
(
LDAP_DN_ASCII_LCASE_HEXALPHA
(
c2
)
)
{
if
(
LDAP_DN_ASCII_UCASE_HEXALPHA
(
c2
)
)
{
*
c
+=
c2
-
'A'
+
10
;
}
else
{
assert
(
LDAP_DN_ASCII_LCASE_HEXALPHA
(
c2
)
);
*
c
+=
c2
-
'a'
+
10
;
}
}
...
...
@@ -1900,7 +1900,9 @@ strval2strlen( struct berval *val, unsigned flags, ber_len_t *len )
ber_len_t
l
,
cl
=
1
;
char
*
p
;
int
escaped_byte_len
=
LDAP_DN_IS_PRETTY
(
flags
)
?
1
:
3
;
#ifdef PRETTY_ESCAPE
int
escaped_ascii_len
=
LDAP_DN_IS_PRETTY
(
flags
)
?
2
:
3
;
#endif
/* PRETTY_ESCAPE */
assert
(
val
);
assert
(
len
);
...
...
@@ -2291,7 +2293,7 @@ strval2ADstr( struct berval *val, char *str, unsigned flags, ber_len_t *len )
/*
* If the DN is terminated by single-AVA RDNs with attribute type of "dc",
* the f
o
rst part of the AD representation of the DN is written in DNS
* the f
i
rst part of the AD representation of the DN is written in DNS
* form, i.e. dot separated domain name components (as suggested
* by Luke Howard, http://www.padl.com/~lukeh)
*/
...
...
@@ -2308,7 +2310,7 @@ dn2domain( LDAPDN *dn, char *str, int *iRDN )
assert
(
dn
);
assert
(
str
);
assert
(
iRDN
);
assert
(
*
iRDN
>
0
);
assert
(
*
iRDN
>
=
0
);
for
(
i
=
*
iRDN
;
i
>=
0
;
i
--
)
{
LDAPRDN
*
rdn
;
...
...
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