[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
How to present objectclass attributes
Hi again!
Yet another boring question.....
when I collect info about a node in my Btrieve database I insert the
objectclass attributes first (before inserting the values, like "o:
AMV") but I'm not really sure how this should be done.
For an organization 'o' I insert the dn, ndn and syntax as always but
how should I link the attributes???
I tried
myEntry->e_attrs=
attr1->a_type="OBJECTCLASS"
attr1->a_syntax=0;
attr1->a_vals[0]->bv_val="TOP"
attr1->a_vals[0]->bv_len=strlen("TOP")
attr1->a_vals[1]=NULL;
attr1->a_next=
attr2->a_type="OBJECTCLASS"
attr2->a_syntax=0;
attr2->a_vals[0]->bv_val="ORGANIZATIONNAME"
attr2->a_vals[0]->bv_len=strlen("ORGANIZATIONNAME")
attr2->a_vals[1]=NULL;
attr2->a_next= NULL;
BUT when the client (ldapsearch.exe) present the result from this it
writes:
O=AMV,C=SE
OBJECTCLASS=TOP
OBJECTCLASS=TOP
where O=AMV,C=SE ofcourse is the a one level sub search node from base
dn "c=se" when using ldapsearch like:
ldapsearch -b "c=se" -D "o=amv,c=se" -w tlwc -s one "objectclass=*"
Then I was assuming that inserting an objectclass attribute like
organizationname AUTOMATICALLY set
that TOP was inserted (on client side) in printout, and that the client
ONLY printed 2 objectclass attributes,
so I skipped the first objectclass attribute (only returning
'objectclass=organizationname') but then the client only presented:
O=AMV,C=SE
OBJECTCLASS=ORGANIZATIONNAME
ie no TOP attribute was presented???
I am confused...how should my linked list of objectclass attributes look
like when I want to return a 'o' attribute for example???
--
Greatful for any help
Mikael Grehn