[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
bootParamaterValidate (ITS#1957)
Full_Name: Jim Campbell
Version: 2.0.18/2.2.1
OS: Solaris 2.6
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (147.188.40.2)
Hi,
In schema_init.c the routine bootParameterValidate() is a bit to rigorous
in its syntax check for the Sun bootparam parameters:
dn: cn=npxtst,ou=Ethers,dc=NP,dc=PH,dc=BHAM,dc=AC,dc=UK
objectClass: top
objectClass: device
objectClass: ieee802Device
macAddress: 8:0:20:f:41:94
cn: npxtst
objectClass: bootableDevice
bootParameter: root=npsmx:/export/root/npxtst
bootParameter: swap=npsmx:/export/swap/npxtst
bootParameter: swapsize=:32
bootParameter: dump=:
bootParameter: boottype=:di
the code:
/* key */
for (; ( p < e ) && ( *p != '=' ); p++ ) {
if ( !ATTR_CHAR( *p ) ) {
return LDAP_INVALID_SYNTAX;
}
}
and
/* path */
for ( p++; p < e; p++ ) {
if ( !ATTR_CHAR( *p ) ) {
return LDAP_INVALID_SYNTAX;
}
}
needs to be changed to:
/* key */
for (; ( p < e ) && ( *p != '=' ); p++ ) {
if ( !ASCII_PRINTABLE( *p ) ) {
return LDAP_INVALID_SYNTAX;
}
}
and
/* path */
for ( p++; p < e; p++ ) {
if ( !ASCII_PRINTABLE( *p ) ) {
return LDAP_INVALID_SYNTAX;
}
}
for this syntax to work.
diffs for 2.0.18
diff schema_init.c schema_init.c.orig
3649c3649
< if ( !ASCII_PRINTABLE( *p ) ) {
---
> if ( !ATTR_CHAR( *p ) ) {
3671c3671
< if ( !ASCII_PRINTABLE( *p ) ) {
---
> if ( !ATTR_CHAR( *p ) ) {
3674a3675
>
diffs for 2.1.2
diff schema_init.c schema_init.c.orig
4078c4078
< if ( !ASCII_PRINTABLE( *p ) ) {
---
> if ( !ATTR_CHAR( *p ) ) {
4100c4100
< if ( !ASCII_PRINTABLE( *p ) ) {
---
> if ( !ATTR_CHAR( *p ) ) {
cheers
Jim