Re: "net ads join" core dump in ldap_get_values_len

2003-02-19 Thread Chere Zhou
After merging libads/ldap.c from SAMBA_3_0 to my copy of 3.0a21 source code, 
problem solved.  Thanks.

Chere


On Tuesday 18 February 2003 02:18 pm, Chere Zhou wrote:
> Hello,
>
> I am using 3.0a21.  If I use "kinit user@DOMAIN" with a user that does not
> have privilege to join a machine into the domain, I get core dump using
> "net ads join".  This happens when the computer account does not exist in
> the domain.  If the computer account exists in the domain, I get the
> following which is perfectly fine:
> [2003/02/18 13:51:59, 0] libads/ldap.c:ads_join_realm(1325)
>   Host account for chere-2 already exists - deleting old account
> [2003/02/18 13:51:59, 0] libads/ldap.c:ads_join_realm(1329)
>   Failed to delete host 'chere-2' from the 'ZHOU.COM' realm.
> ads_join_realm: Insufficient access
>
> The "net ads join" core dump shows:
>
> Assertion failed: (entry != NULL), function ldap_get_values_len, file
> getvalues.c, line 93.
> Abort (core dumped)
>
> A gdb back trace is:
> #0  0x28455cff in kill () from /usr/lib/libc.so.5
> #1  0x284a7e32 in abort () from /usr/lib/libc.so.5
> #2  0x2848600f in __assert () from /usr/lib/libc.so.5
> #3  0x28252de1 in ldap_get_values_len () from /usr/local/lib/libldap.so.2
> #4  0x814b9d3 in ads_pull_sid (ads=0x8249380, msg=0x0,
> field=0x819b0a1 "objectSid", sid=0xbfbff518) at libads/ldap.c:1598
> #5  0x814b542 in ads_set_machine_sd (ads=0x8249380,
> hostname=0x81b9b90 "chere-2",
> dn=0x81f0440 "cn=chere-2,cn=Computers,dc=ZHOU,dc=COM")
> at libads/ldap.c:1431
> #6  0x814a7ec in ads_add_machine_acct (ads=0x8249380,
> hostname=0x81b9b90 "chere-2", org_unit=0x8165ca8 "Computers")
> at libads/ldap.c:1085
> #7  0x814b015 in ads_join_realm (ads=0x8249380, hostname=0x81b9a30
> "CHERE-2", org_unit=0x8165ca8 "Computers") at libads/ldap.c:1334
> #8  0x806d945 in net_ads_join (argc=0, argv=0x81b906c) at
> utils/net_ads.c:648 #9  0x806b196 in net_run_function (argc=1,
> argv=0x81b9068, table=0xbfbff7e0, usage_fn=0x806c1f0 ) at
> utils/net.c:97
> #10 0x806e6dc in net_ads (argc=1, argv=0x81b9068) at utils/net_ads.c:1040
> #11 0x806b196 in net_run_function (argc=2, argv=0x81b9064, table=0x819ee94,
> usage_fn=0x806f3fc ) at utils/net.c:97
> #12 0x806c17b in main (argc=3, argv=0xbfbffb5c) at utils/net.c:555
> #13 0x806b035 in _start ()
>
> I have some problems building cvs version on my platform.  So I want to
> know if this is fixed in cvs.  "fixed" means it returns a meaningful
> message instead of core dump.  If yes, please point me to the place I
> should look at.
>
> Thanks a lot !
> Chere



"net ads join" core dump in ldap_get_values_len

2003-02-18 Thread Chere Zhou
Hello,

I am using 3.0a21.  If I use "kinit user@DOMAIN" with a user that does not 
have privilege to join a machine into the domain, I get core dump using "net 
ads join".  This happens when the computer account does not exist in the 
domain.  If the computer account exists in the domain, I get the following 
which is perfectly fine:
[2003/02/18 13:51:59, 0] libads/ldap.c:ads_join_realm(1325)
  Host account for chere-2 already exists - deleting old account
[2003/02/18 13:51:59, 0] libads/ldap.c:ads_join_realm(1329)
  Failed to delete host 'chere-2' from the 'ZHOU.COM' realm.
ads_join_realm: Insufficient access

The "net ads join" core dump shows:

Assertion failed: (entry != NULL), function ldap_get_values_len, file 
getvalues.c, line 93.
Abort (core dumped)

A gdb back trace is:
#0  0x28455cff in kill () from /usr/lib/libc.so.5
#1  0x284a7e32 in abort () from /usr/lib/libc.so.5
#2  0x2848600f in __assert () from /usr/lib/libc.so.5
#3  0x28252de1 in ldap_get_values_len () from /usr/local/lib/libldap.so.2
#4  0x814b9d3 in ads_pull_sid (ads=0x8249380, msg=0x0,
field=0x819b0a1 "objectSid", sid=0xbfbff518) at libads/ldap.c:1598
#5  0x814b542 in ads_set_machine_sd (ads=0x8249380,
hostname=0x81b9b90 "chere-2",
dn=0x81f0440 "cn=chere-2,cn=Computers,dc=ZHOU,dc=COM")
at libads/ldap.c:1431
#6  0x814a7ec in ads_add_machine_acct (ads=0x8249380,
hostname=0x81b9b90 "chere-2", org_unit=0x8165ca8 "Computers")
at libads/ldap.c:1085
#7  0x814b015 in ads_join_realm (ads=0x8249380, hostname=0x81b9a30 "CHERE-2",
org_unit=0x8165ca8 "Computers") at libads/ldap.c:1334
#8  0x806d945 in net_ads_join (argc=0, argv=0x81b906c) at utils/net_ads.c:648
#9  0x806b196 in net_run_function (argc=1, argv=0x81b9068, table=0xbfbff7e0,
usage_fn=0x806c1f0 ) at utils/net.c:97
#10 0x806e6dc in net_ads (argc=1, argv=0x81b9068) at utils/net_ads.c:1040
#11 0x806b196 in net_run_function (argc=2, argv=0x81b9064, table=0x819ee94,
usage_fn=0x806f3fc ) at utils/net.c:97
#12 0x806c17b in main (argc=3, argv=0xbfbffb5c) at utils/net.c:555
#13 0x806b035 in _start ()

I have some problems building cvs version on my platform.  So I want to know 
if this is fixed in cvs.  "fixed" means it returns a meaningful message 
instead of core dump.  If yes, please point me to the place I should look at.

Thanks a lot !
Chere