[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Problems with set up and connection...?



Walker, Mike wrote:
> 
> Johan,
> 
> Too much shell shielding!
	Well, I was only following instructions :)
> 
> I think the way you are shielding characters from the shell is redundant?
> Look at what slapd is getting as your baseDN:
> 
> >~~~From slapd:
> (blah blah blah)
> >conn=0 fd=7 connection from pbroker1q.jc.jefco.com (169.196.22.47)
> accepted.
> (blah blah blah)
> >conn=0 op=1 SRCH base="O=\"JEFFERIES & CO.\",C=US" scope=2
> >filter="(objectclass=*)"
> 
> Notice the difference between what slapd is reading as your baseDN and what
> is reading your filter as. If we strip slapd's double-quotes, we get:
> 
> filter: (objectclass=*)
> base: O=\"JEFFERIES & CO.\",C=US
> 
> There are no quotes in your filter!
> 
> I think what you wanted was
> 
> base: O=JEFFERIES & CO.
> 
> The single quote is really all the shell-shielding you need. Try
> ldapsearch -b 'o=Jefferies & Co.,c=us' 'objectClass=*' -d 65535
> 
> One way to find out how much shell shielding you need is to use echo, i.e.
> >echo 'Jefferies & Co.'
> Jefferies & Co.
> 
> If you get funny stuff in this display then you needed to shield
> something... but I don't think you will (:

	Eh, uh, this is the result of 
>ldapsearch -b 'o=Jefferies & Co.,c=us' 'objectClass=*' -d 65535

client:
ldap_init
ldap_bind_s
ldap_simple_bind_s
ldap_simple_bind
ldap_send_initial_request
open_ldap_connection
ldap_connect_to_host: pbroker1q.jc.jefco.com:389
sd 4 connected to: 169.196.22.47
ldap_delayed_open successful, ld_host is (null)
ldap_send_server_request
ber_flush: 14 bytes to sd 4
         0 0c 02 01 01  ` 07 02 01 02 04 00 80 00 
ldap_result
wait4msg (infinite timeout)
** Connections:
* host: pbroker1q.jc.jefco.com  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Wed Apr 14 14:44:16 1999

** Outstanding Requests:
 * msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
** Response Queue:
   Empty
do_ldap_select
read1msg
ber_get_next
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf 0x8055fa0, ptr 0x8055fa0, end 0x8055fac
          current len 12, contents:
        02 01 01  a 07 0a 01 00 04 00 04 00 
got result msgid 1, original id 1
ber_scanf fmt ({iaa}) ber:
ber_dump: buf 0x8055fa0, ptr 0x8055fa3, end 0x8055fac
          current len 9, contents:
         a 07 0a 01 00 04 00 04 00 
new result:  res_errno: 0, res_error: <>, res_matched: <>
read1msg:  0 new referrals
request 1 done
res_errno: 0, res_error: <>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_free_connection
ldap_free_connection: refcnt 1
ldap_result2error
ber_scanf fmt ({iaa}) ber:
ber_dump: buf 0x8055fa0, ptr 0x8055fa3, end 0x8055fac
          current len 9, contents:
         a 07 0a 01 00 04 00 04 00 
ldap_msgfree
ldap_search
put_filter "objectClass=*"
put_filter: default
put_simple_filter "objectClass=*"
ldap_send_initial_request
ldap_send_server_request
ber_flush: 61 bytes to sd 4
         0  ; 02 01 02  c  6 04 16  o  =  J  e  f  f  e
         r  i  e  s 20  & 20  C  o  .  ,  c  =  u  s 0a
        01 02 0a 01 00 02 01 0c 02 01 0f 01 01 00 87 0b
         o  b  j  e  c  t  C  l  a  s  s  0 00 
ldap_result
wait4msg (infinite timeout)
** Connections:
* host: pbroker1q.jc.jefco.com  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Wed Apr 14 14:44:16 1999

** Outstanding Requests:
 * msgid 2,  origid 2, status InProgress
   outstanding referrals 0, parent count 0
** Response Queue:
   Empty
do_ldap_select
read1msg
ber_get_next
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf 0x8055ff0, ptr 0x8055ff0, end 0x8055ffc
          current len 12, contents:
        02 01 02  e 07 0a 01 20 04 00 04 00 
got result msgid 2, original id 2
ber_scanf fmt ({iaa}) ber:
ber_dump: buf 0x8055ff0, ptr 0x8055ff3, end 0x8055ffc
          current len 9, contents:
         e 07 0a 01 20 04 00 04 00 
ldap_chase_referrals
new result:  res_errno: 32, res_error: <>, res_matched: <>
read1msg:  0 new referrals
request 2 done
res_errno: 32, res_error: <>, res_matched: <>
ldap_free_request (origid 2, msgid 2)
ldap_free_connection
ldap_free_connection: refcnt 1
ldap_result2error
ber_scanf fmt ({iaa}) ber:
ber_dump: buf 0x8055ff0, ptr 0x8055ff3, end 0x8055ffc
          current len 9, contents:
         e 07 0a 01 20 04 00 04 00 
ldap_perror
ldap_search: No such object
ldap_msgfree
ldap_unbind
ldap_free_connection
ldap_send_unbind
ber_flush: 7 bytes to sd 4
         0 05 02 01 03  B 00 
ldap_free_connection: actually freed

~~~~slapd spewed:
select activity on 1 descriptors
activity on: 7r
read activity on 7
ber_get_next
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf 0x8075040, ptr 0x8075040, end 0x807504c
          current len 12, contents:
        02 01 01  ` 07 02 01 02 04 00 80 00 
do_bind
do_bind: version 2 dn () method 128
conn=0 op=0 BIND dn="" method=128
send_ldap_result 0::
ber_flush: 14 bytes to sd 7
         0 0c 02 01 01  a 07 0a 01 00 04 00 04 00 
conn=0 op=0 RESULT err=0 tag=97 nentries=0
listening for connections on 6, activity on: 7r
before select active_threads 0
select activity on 1 descriptors
activity on: 7r
read activity on 7
ber_get_next
ber_get_next: tag 0x30 len 59 contents:
ber_dump: buf 0x808dac0, ptr 0x808dac0, end 0x808dafb
          current len 59, contents:
        02 01 02  c  6 04 16  o  =  J  e  f  f  e  r  i
         e  s 20  & 20  C  o  .  ,  c  =  u  s 0a 01 02
        0a 01 00 02 01 0c 02 01 0f 01 01 00 87 0b  o  b
         j  e  c  t  C  l  a  s  s  0 00 
do_search
SRCH "O=JEFFERIES & CO.,C=US" 2 0    12 15 0
begin get_filter
PRESENT
end get_filter 0
    filter: (objectclass=*)
    attrs:
conn=0 op=1 SRCH base="O=JEFFERIES & CO.,C=US" scope=2
filter="(objectclass=*)"
send_ldap_result 32::
ber_flush: 14 bytes to sd 7
         0 0c 02 01 02  e 07 0a 01 20 04 00 04 00 
conn=0 op=1 RESULT err=32 tag=101 nentries=0
listening for connections on 6, activity on: 7r
before select active_threads 0
select activity on 1 descriptors
activity on: 7r
read activity on 7
ber_get_next
ber_get_next: tag 0x30 len 5 contents:
ber_dump: buf 0x808dac0, ptr 0x808dac0, end 0x808dac5
          current len 5, contents:
        02 01 03  B 00 
do_unbind
conn=0 op=2 UNBIND
conn=0 op=2 fd=7 closed errno=0
listening for connections on 6, activity on:
before select active_threads 0

*grumble* No real result where I wanted it seemingly *sigh*

With thanks to his helpers, and hope for more help,
Johan

--------------------------------------------------------------
Jefferies & Company Inc. archives and may review electronic 
correspondence.  It may be required to be produced to the SEC to other 
regulators in a criminal investigation or in civil litigation.  Any 
message coming into Jefferies & Company Inc. may be subject to the same 
requirements.