Discussion:
Invalid syntax error from syntax_is_time() on ldapd(8) when adding entries
Seiya Kawashima
2017-05-05 10:05:19 UTC
Permalink
Synopsis: Invalid syntax error from syntax_is_time() on ldapd(8) when adding entries
Category: system
System : OpenBSD 6.1
Details : OpenBSD 6.1-current (GENERIC.MP) #50: Thu May 4 11:52:48 MDT 2017
***@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Architecture: OpenBSD.amd64
Machine : amd64
Thank you for the great work on ldapd(8).

ldapd(8) had been working great until I moved to OpenBSD 6.1-current (GENERIC.MP) #50.
The entire dmesg is attached at the end of this report. If this report is not relevant,
please discard it. The relevant parts are syntax_is_gentime(), syntax_is_utctime and
syntax_is_time() on syntax.c. I still wonder why it worked without the fix shown below and
now it doesn't work without any modification.

When adding entries to ldapd(8), a "createTimestamp" attribute is added as a part of
the operational attributes within ber_add_string() on modify.c. The "createTimestamp"
is created by ldap_strftime() via ldap_now() on attributes.c. ldap_strftime() calls
strftime(3) as follows:

strftime(tmbuf, sizeof(tmbuf), "%Y%m%d%H%M%SZ", gmt);

ldap_now() returns a Generalized Time character string as follows:

20170504184415Z


When this "createTimestamp" attribute is created, it's validated by the corresponding
validation function. This function seems to cause the Invalid syntax error and ldapd(8)
aborts the addition at the time.


The "createTimestamp" attribute is set to have syntax_is_gentime() as the validation
function on syntax.c like below.

static struct syntax syntaxes[] = {

...
{ "1.3.6.1.4.1.1466.115.121.1.24", "Generalized Time", syntax_is_gentime }
...

};

syntax_is_gentime() is a wrapper function of syntax_is_time() setting 1 as the third
parameter. Another wrapper function of syntax_is_time() is syntax_is_utctime() setting
0 as the third parameter. syntax_is_gentime() intends to be for Generalized Time and
syntax_is_utctime intends to be for UTC Time. They are on syntax.c.

static int
syntax_is_gentime(struct schema *schema, char *value, size_t len)
{
return syntax_is_time(schema, value, len, 1);
}

static int
syntax_is_utctime(struct schema *schema, char *value, size_t len)
{
return syntax_is_time(schema, value, len, 0);
}

When the Generalized Time character string is validated by syntax_is_time() on syntax.c,
Invalid syntax error is returned. The error appears on the client side like

$ ldapadd -vv -H ldaps://192.168.2.5 -x -D "cn=admin,dc=example,dc=com" -w secret \
-f ./ldapd-invalid-syntax.ldif
ldap_initialize( ldaps://192.168.2.5:636/??base )
add dc:
example
add description:
My wonderful company as much text as you want to place in here.
add objectClass:
dcObject
organization
add o:
Example, Inc.
adding new entry "dc=example,dc=com"
ldap_add: Invalid syntax (21)

The error appears on the ldapd(8) side like

$sudo ldapd -dvvv
...
btree_txn_begin:686: begin transaction on btree 0x42dabec5a00, root page 4294967295
btree_txn_begin:666: taking write lock on txn 0x42cf176f1a0
btree_ref:1166: ref is now 2 on btree 0x42dabec5b00
btree_read_meta:1011: btree_read_meta: size = 16384
btree_txn_begin:686: begin transaction on btree 0x42dabec5b00, root page 4294967295
May 4 14:58:31.659 [34392] createTimestamp: invalid syntax
May 4 14:58:31.659 [34392] syntax = Generalized Time
May 4 14:58:31.659 [34392] value: [20170504195831Z]
btree_txn_abort:701: abort transaction on btree 0x42dabec5a00, root page 4294967295
btree_txn_abort:714: releasing write lock on txn 0x42d6e68f100
btree_close:1184: ref is now 1 on btree 0x42dabec5a00
btree_txn_abort:701: abort transaction on btree 0x42dabec5b00, root page 4294967295
btree_txn_abort:714: releasing write lock on txn 0x42cf176f1a0
btree_close:1184: ref is now 1 on btree 0x42dabec5b00
May 4 14:58:31.659 [34392] sending response 9 with result 21
...


The client that I used was
$ ldapadd -V
ldapadd: @(#) $OpenLDAP: ldapmodify (Ubuntu) (May 11 2016 16:11:48) $
***@lgw01-10:/build/openldap-mF7Kfq/openldap-2.4.42+dfsg/debian/build/clients/tools
(LDAP library: OpenLDAP 20442)

Thank you
Seiya
1. Please copy the text below and save it as /etc/ldapd.conf. This is a sample
configuration file that I used when getting this error.

schema "/etc/ldap/core.schema"
schema "/etc/ldap/inetorgperson.schema"
schema "/etc/ldap/nis.schema"

## Please adjust these settings for your environment.
listen on re0 ldaps
listen on re1 ldaps

namespace "dc=example,dc=com" {
rootdn "cn=admin,dc=example,dc=com"
rootpw "secret"
index objectClass
index cn
index ou
index uid
index uidNumber
index gidNumber
index mail
index sn
deny access to any by any
allow read access to any by self
allow write access to any by self

2. Please copy the text below and save it as ldapd-invalid-syntax.ldif
wherever convenient. This LDIF is based on
http://www.zytrax.com/books/ldap/ch5/index.html#step1-ldif.

## DEFINE DIT ROOT/BASE/SUFFIX ####
## uses RFC 2377 format
## replace example and com as necessary below
## or for experimentation leave as is

## dcObject is an AUXILLIARY objectclass and MUST
## have a STRUCTURAL objectclass (organization in this case)
# this is an ENTRY sequence and is preceded by a BLANK line

dn: dc=example,dc=com
dc: example
description: My wonderful company as much text as you want to place
in here.
objectClass: dcObject
objectClass: organization
o: Example, Inc.

## FIRST Level hierarchy - people
## uses mixed upper and lower case for objectclass
# this is an ENTRY sequence and is preceded by a BLANK line

dn: ou=people, dc=example,dc=com
ou: people
description: All people in organisation
objectclass: organizationalunit

3. Please start ldapd(8).
$ sudo ldapd -dvvv

4. Please start a LDAP client.
$ ldapadd -vv -H ldaps://192.168.2.5 -x -D "cn=admin,dc=example,dc=com" \
-w secret -f path/to/ldapd-invalid-syntax.ldif
syntax_is_time() would need to call CHECK_RANGE on second to check the value
regardless UTC Time, gen is 0 or Generalized Time, gen is 1. The current code
seems to check second only when it validates UTC Time and (unsigned char)*p is a
digit but not Generalized Time and (unsigned char)*p is a digit. The diff below
makes syntax_is_time() check second for UTC Time and Generalized Time when
(unsigned char)*p is a digit.

Index: syntax.c
===================================================================
RCS file: /cvs/src/usr.sbin/ldapd/syntax.c,v
retrieving revision 1.4
diff -u -p -r1.4 syntax.c
--- syntax.c 13 Apr 2017 14:48:31 -0000 1.4
+++ syntax.c 5 May 2017 01:29:38 -0000
@@ -287,7 +287,7 @@ syntax_is_time(struct schema *schema, ch

if (!gen || isdigit((unsigned char)*p)) {
CHECK_RANGE(0, 59); /* minute */
- if (!gen && isdigit((unsigned char)*p))
+ if (isdigit((unsigned char)*p))
CHECK_RANGE(0, 59+gen); /* second or leap-second */
if (*p == '\0')
return 1;

Generalized Time could have second or leap-second after minute if I understand
the corresponding RFC 4517 correctly. The sections below are from RFC 4517 at
https://www.ietf.org/rfc/rfc4517.txt about Generalized Time and UTC Time that
syntax_is_time() takes care of.

3.3.13. Generalized Time
GeneralizedTime = century year month day hour
[ minute [ second / leap-second ] ]
[ fraction ]
g-time-zone

century = 2(%x30-39) ; "00" to "99"
year = 2(%x30-39) ; "00" to "99"
month = ( %x30 %x31-39 ) ; "01" (January) to "09"
/ ( %x31 %x30-32 ) ; "10" to "12"
day = ( %x30 %x31-39 ) ; "01" to "09"
/ ( %x31-32 %x30-39 ) ; "10" to "29"
/ ( %x33 %x30-31 ) ; "30" to "31"
hour = ( %x30-31 %x30-39 ) / ( %x32 %x30-33 ) ; "00" to "23"
minute = %x30-35 %x30-39 ; "00" to "59"

second = ( %x30-35 %x30-39 ) ; "00" to "59"
leap-second = ( %x36 %x30 ) ; "60"

fraction = ( DOT / COMMA ) 1*(%x30-39)
g-time-zone = %x5A ; "Z"
/ g-differential
g-differential = ( MINUS / PLUS ) hour [ minute ]
MINUS = %x2D ; minus sign ("-")

3.3.34. UTC Time
UTCTime = year month day hour minute [ second ]
[ u-time-zone ]

u-time-zone = %x5A ; "Z"
/ u-differential
u-differential = ( MINUS / PLUS ) hour minute

Second or leap-second optionally comes after minute in Generalized Time.
Second optionally comes after minute in UTC Time. That would mean that
syntax_is_time() needs to call CHECK_RANGE on second if ((unsigned char)*p)
is a digit after CHECK_RANGE on minute for both of Generalized Time and
UTC Time. With this way, gen can still be used as an increment for
the upper limit of CHECK_RANGE on second or leap-second.

dmesg:
OpenBSD 6.1-current (GENERIC.MP) #50: Thu May 4 11:52:48 MDT 2017
***@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8555204608 (8158MB)
avail mem = 8290131968 (7906MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xeb350 (79 entries)
bios0: vendor American Megatrends Inc. version "P01-A3" date 04/19/2011
bios0: Gateway FX6860
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC SSDT MCFG SLIC HPET
acpi0: wakeup devices BR20(S3) EUSB(S4) USBE(S4) PEX0(S4) PEX1(S4) PEX2(S4) PEX3(S4) PEX4(S4) PEX5(S4) GBE_(S4) PEX6(S4) PEX7(S4) P0P1(S4) P0P2(S4) P0P3(S4) P0P4(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3392.89 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 3392892760 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3392.30 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3392.30 MHz
cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3392.30 MHz
cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
cpu4 at mainbus0: apid 1 (application processor)
cpu4: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3392.30 MHz
cpu4: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu4: 256KB 64b/line 8-way L2 cache
cpu4: smt 1, core 0, package 0
cpu5 at mainbus0: apid 3 (application processor)
cpu5: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3392.30 MHz
cpu5: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu5: 256KB 64b/line 8-way L2 cache
cpu5: smt 1, core 1, package 0
cpu6 at mainbus0: apid 5 (application processor)
cpu6: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3392.30 MHz
cpu6: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu6: 256KB 64b/line 8-way L2 cache
cpu6: smt 1, core 2, package 0
cpu7 at mainbus0: apid 7 (application processor)
cpu7: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3392.30 MHz
cpu7: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu7: 256KB 64b/line 8-way L2 cache
cpu7: smt 1, core 3, package 0
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (PEX0)
acpiprt2 at acpi0: bus -1 (PEX1)
acpiprt3 at acpi0: bus -1 (PEX2)
acpiprt4 at acpi0: bus 3 (PEX3)
acpiprt5 at acpi0: bus 4 (PEX4)
acpiprt6 at acpi0: bus 5 (PEX5)
acpiprt7 at acpi0: bus -1 (PEX6)
acpiprt8 at acpi0: bus -1 (PEX7)
acpiprt9 at acpi0: bus 1 (P0P1)
acpiprt10 at acpi0: bus -1 (P0P2)
acpiprt11 at acpi0: bus -1 (P0P3)
acpiprt12 at acpi0: bus -1 (P0P4)
acpicpu0 at acpi0: C3(***@104 ***@0x20), C1(***@1 halt), PSS
acpicpu1 at acpi0: C3(***@104 ***@0x20), C1(***@1 halt), PSS
acpicpu2 at acpi0: C3(***@104 ***@0x20), C1(***@1 halt), PSS
acpicpu3 at acpi0: C3(***@104 ***@0x20), C1(***@1 halt), PSS
acpicpu4 at acpi0: C3(***@104 ***@0x20), C1(***@1 halt), PSS
acpicpu5 at acpi0: C3(***@104 ***@0x20), C1(***@1 halt), PSS
acpicpu6 at acpi0: C3(***@104 ***@0x20), C1(***@1 halt), PSS
acpicpu7 at acpi0: C3(***@104 ***@0x20), C1(***@1 halt), PSS
"PNP0303" at acpi0 not configured
"INT3F0D" at acpi0 not configured
acpibtn0 at acpi0: PWRB
"PNP0C14" at acpi0 not configured
cpu0: Enhanced SpeedStep 3392 MHz: speeds: 3401, 3400, 3200, 3000, 2800, 2600, 2400, 2200, 2000, 1800, 1600 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
ppb0 at pci0 dev 1 function 0 "Intel Core 2G PCIE" rev 0x09: msi
pci1 at ppb0 bus 1
radeondrm0 at pci1 dev 0 function 0 "ATI Radeon HD 5750" rev 0x00
drm0 at radeondrm0
radeondrm0: msi
azalia0 at pci1 dev 0 function 1 "ATI Radeon HD 5700 Audio" rev 0x00: msi
azalia0: no supported codecs
"Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
ehci0 at pci0 dev 26 function 0 "Intel 6 Series USB" rev 0x05: apic 0 int 16
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia1 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" rev 0x05: msi
azalia1: codecs: Realtek ALC662
audio0 at azalia1
ppb1 at pci0 dev 28 function 0 "Intel 6 Series PCIE" rev 0xb5: msi
pci2 at ppb1 bus 2
ppb2 at pci0 dev 28 function 3 "Intel 6 Series PCIE" rev 0xb5: msi
pci3 at ppb2 bus 3
xhci0 at pci3 dev 0 function 0 "NEC xHCI" rev 0x03: msi
usb1 at xhci0: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "NEC xHCI root hub" rev 3.00/1.00 addr 1
ppb3 at pci0 dev 28 function 4 "Intel 6 Series PCIE" rev 0xb5: msi
pci4 at ppb3 bus 4
re0 at pci4 dev 0 function 0 "Realtek 8168" rev 0x01: RTL8168 2 (0x3800), msi, address b0:48:7a:80:11:c8
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 PHY, rev. 2
ppb4 at pci0 dev 28 function 5 "Intel 6 Series PCIE" rev 0xb5: msi
pci5 at ppb4 bus 5
re1 at pci5 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E-VL (0x2c80), msi, address e0:69:95:96:62:63
rgephy1 at re1 phy 7: RTL8169S/8110S/8211 PHY, rev. 5
ehci1 at pci0 dev 29 function 0 "Intel 6 Series USB" rev 0x05: apic 0 int 23
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel H67 LPC" rev 0x05
ahci0 at pci0 dev 31 function 2 "Intel 6 Series AHCI" rev 0x05: msi, AHCI 1.3
ahci0: port 0: 3.0Gb/s
ahci0: port 4: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, ST31500341AS, CC4H> SCSI3 0/direct fixed naa.5000c5002e16e693
sd0: 1430799MB, 512 bytes/sector, 2930277168 sectors
cd0 at scsibus1 targ 4 lun 0: <HL-DT-ST, DVDRAM GH60N, UG01> ATAPI 5/cdrom removable
ichiic0 at pci0 dev 31 function 3 "Intel 6 Series SMBus" rev 0x05: apic 0 int 18
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM PC3-10600
spdmem1 at iic0 addr 0x51: 2GB DDR3 SDRAM PC3-10600
spdmem2 at iic0 addr 0x52: 2GB DDR3 SDRAM PC3-10600
spdmem3 at iic0 addr 0x53: 2GB DDR3 SDRAM PC3-10600
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
it0 at isa0 port 0x2e/2: IT8772F rev 0, EC port 0xa30
vmm0 at mainbus0: VMX/EPT
uhub3 at uhub0 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
uhub4 at uhub2 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
uhidev0 at uhub4 port 4 configuration 1 interface 0 "PixArt USB Optical Mouse" rev 2.00/1.00 addr 3
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
umass0 at uhub4 port 5 configuration 1 interface 0 "Generic USB2.0-CRW" rev 2.00/81.91 addr 4
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: <Generic-, Compact Flash, 1.00> SCSI0 0/direct removable
sd2 at scsibus2 targ 1 lun 1: <Generic-, xD-Picture, 1.00> SCSI0 0/direct removable
sd3 at scsibus2 targ 1 lun 2: <Generic-, SD/MMC, 1.00> SCSI0 0/direct removable
sd4 at scsibus2 targ 1 lun 3: <Generic-, MS/MS-Pro/HG, 1.00> SCSI0 0/direct removable
sd5 at scsibus2 targ 1 lun 4: <Generic-, MicroSD, 1.00> SCSI0 0/direct removable
uhidev1 at uhub4 port 5 configuration 1 interface 1 "Generic USB2.0-CRW" rev 2.00/81.91 addr 4
uhidev1: iclass 3/0, 5 report ids
uhid0 at uhidev1 reportid 4: input=7, output=0, feature=0
uhid1 at uhidev1 reportid 5: input=0, output=1, feature=0
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd0a (f3f65709d6e99adc.a) swap on sd0b dump on sd0b
radeondrm0: 1024x768, 32bpp
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
Jonathan Matthew
2017-05-28 15:49:10 UTC
Permalink
Post by Seiya Kawashima
Synopsis: Invalid syntax error from syntax_is_time() on ldapd(8) when adding entries
Category: system
System : OpenBSD 6.1
Details : OpenBSD 6.1-current (GENERIC.MP) #50: Thu May 4 11:52:48 MDT 2017
Architecture: OpenBSD.amd64
Machine : amd64
Thank you for the great work on ldapd(8).
ldapd(8) had been working great until I moved to OpenBSD 6.1-current (GENERIC.MP) #50.
The entire dmesg is attached at the end of this report. If this report is not relevant,
please discard it. The relevant parts are syntax_is_gentime(), syntax_is_utctime and
syntax_is_time() on syntax.c. I still wonder why it worked without the fix shown below and
now it doesn't work without any modification.
Thanks for reporting and investigating this. I've commited a fix, also fixing the
check for timezones on generalized times.

What happened here was that in r1.4 of syntax.c, we corrected the CHECK_RANGE macro,
which previously wouldn't work properly following an 'if' statement with no braces.
The function had accidentally been written to rely on the effects of doing this, and
unfortunately we didn't notice that fixing the macro caused the function to misbehave.
Loading...