Bug 13022 - net ads join crashes with specific /etc/resolv.conf
net ads join crashes with specific /etc/resolv.conf
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools
4.6.7
All All
: P5 normal
: ---
Assigned To: Andrew Bartlett
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-09 18:10 UTC by Evgeny Sinelnikov
Modified: 2017-09-12 03:57 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evgeny Sinelnikov 2017-09-09 18:10:35 UTC
net tool crash to segfault with multiple domains in 'search' record at /etc/resolv.conf

Steps to reproduce:

$ cat /etc/resolv.conf
# Generated by resolvconf
# Do not edit manually, use
# /etc/net/ifaces/<interface>/resolv.conf instead.
domain xdomain.alt
search xdomain.alt darkmastersin.net
nameserver 192.168.56.2
nameserver 10.0.2.3

$ sudo net ads join '-UAdministrator%Pa$$word'
Using short domain name -- XDOMAIN
Joined 'CLIENT' to dns domain 'xdomain.alt'
Segmentation fault


Fixed case:

$ sudo vi /etc/resolv.conf
$ cat /etc/resolv.conf
# Generated by resolvconf
# Do not edit manually, use
# /etc/net/ifaces/<interface>/resolv.conf instead.
domain xdomain.alt
search xdomain.alt
nameserver 192.168.56.2
nameserver 10.0.2.3

[vagrant@client ~]$ sudo net ads join '-UAdministrator%Pa$$word'
Using short domain name -- XDOMAIN
Joined 'CLIENT' to dns domain 'xdomain.alt'
No DNS domain configured for client. Unable to perform DNS Update.
DNS update failed: NT_STATUS_INVALID_PARAMETER


Samba config:

$ grep -v -e "^\s*$" -e "^\s*\(#\|;\)" /etc/samba/smb.conf
[global]
        security = ads
        realm = XDOMAIN.ALT
        workgroup = XDOMAIN
        netbios name = CLIENT
        template shell = /bin/bash
        kerberos method = system keytab
        wins support = no
        idmap config * : range = 10000-20000000
        idmap config * : backend = tdb
[homes]
        comment = Home Directories
        browseable = no
        writable = yes
[printers]
        comment = All Printers
        path = /var/spool/samba
        browseable = no
        guest ok = no
        writable = no
        printable = yes
Comment 1 Jeremy Allison 2017-09-12 00:08:57 UTC
Can you attach a debug backtrace with symbols please ?