Bug 2036 - net ads join segfaults
Summary: net ads join segfaults
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: net utility (show other bugs)
Version: 3.0.8
Hardware: Other Linux
: P3 normal
Target Milestone: none
Assignee: Jim McDonough
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-15 03:52 UTC by Thomas M Steenholdt
Modified: 2005-08-24 10:25 UTC (History)
0 users

See Also:


Attachments
Proposed patch. (1.61 KB, patch)
2004-11-15 11:54 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas M Steenholdt 2004-11-15 03:52:18 UTC
On my x86_64 box running Fedora Core 3, net segfaults when attempting to join an
ADS domain.

[root@smbserver ~]# gdb net
GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db
library "/lib64/tls/libthread_db.so.1".
 
(gdb) run ads join -U administrator@domain.com
Starting program: /usr/bin/net ads join -U administrator@domain.com
administrator@domain.com's password:
[2004/11/15 11:49:42, 0] libads/ldap.c:ads_add_machine_acct(1366)
  ads_add_machine_acct: Host account for smbserver already exists - modifying
old account
 
Program received signal SIGSEGV, Segmentation fault.
0x0000002a96092590 in ldap_msgfree () from /usr/lib64/libldap-2.2.so.7
(gdb) bt
#0  0x0000002a96092590 in ldap_msgfree () from /usr/lib64/libldap-2.2.so.7
#1  0x000000552abea625 in ads_workgroup_name (ads=0x552ae2b550,
mem_ctx=0x552ae303a0, workgroup=0x7fbffff168) at libads/ldap.c:2508
#2  0x000000552aaeb565 in net_ads_join (argc=0, argv=0x5500000000) at
utils/net_ads.c:795
#3  0x000000552aaec965 in net_ads (argc=1, argv=0x552ad84330) at
utils/net_ads.c:1479
#4  0x000000552aae9bf0 in main (argc=5, argv=0x7fbffff9b8) at utils/net.c:849
(gdb)

I did try removing the existing computer account up front, but with same result.

Please let me know if i can try/provide you with something else.
Comment 1 Jeremy Allison 2004-11-15 11:54:34 UTC
Created attachment 773 [details]
Proposed patch.
Comment 2 Jeremy Allison 2004-11-15 11:54:51 UTC
Can you try the proposed patch ?

Thanks,

Jeremy.
Comment 3 Thomas M Steenholdt 2004-11-17 00:28:21 UTC
Had some problems building samba, which is why my reply took so logn, sorry!

So i finally got the whole thing rebuilt with the attached patch and my problem
is gone!

Thanks a lot!
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:25:19 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.