Bug 8453 - smbclient segfaults when dialect option -m is used for legacy dialects
Summary: smbclient segfaults when dialect option -m is used for legacy dialects
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks: 8399
  Show dependency treegraph
 
Reported: 2011-09-13 01:53 UTC by Guenter Kukkukk
Modified: 2011-09-22 19:57 UTC (History)
2 users (show)

See Also:


Attachments
git-am fix for 3.6.1. (1.08 KB, patch)
2011-09-14 18:56 UTC, Jeremy Allison
kukks: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guenter Kukkukk 2011-09-13 01:53:09 UTC
When using the smbclient option -m to specify a legacy dialect like "CORE",
a segfault occurs.

smbclient //localhost/cifstest -m CORE -Ugk
...
Segmentation fault

I added a debug info in:

source3/libsmb/clidfs.c -->  do_connect()
....
	if ( show_sessetup ) {
	         DEBUG(0,("GK server_domain: 0x%p server_os: 0x%p server_type: 0x%p\n",
			 c->server_domain,c->server_os,c->server_type));
....

which results to:
GK server_domain: 0x(nil) server_os: 0x(nil) server_type: 0x(nil)

So all three pointers are passed as NULL.

I'm not sure whether it should be fixed here, or in other places.
Cheers, Günter
Comment 1 Stefan Metzmacher 2011-09-13 06:29:04 UTC
I think we should stop using c->server_domain,c->server_os,c->server_type
completely. Because new dialects like smb2 won't support them too.
Comment 2 Jeremy Allison 2011-09-14 18:56:59 UTC
Created attachment 6889 [details]
git-am fix for 3.6.1.

Kukks - can you confirm this fixes your problem please ?
Thanks,
Jeremy.
Comment 3 Guenter Kukkukk 2011-09-15 00:19:12 UTC
Hi Jeremy,

It fixes the segfault - so all is fine so far.

When debugging this, i found some other glitches in smbclient
when forcing legacy dialects, but i need to have a closer look.
I'll open a _new_ bug, when i have more info.

So i think that this one can be closed.
Cheers, Günter
Comment 4 Jeremy Allison 2011-09-15 00:26:14 UTC
Kukks, can you click on the "details" link on the attachment on the bug and set the review flag from '?' to '+'. That is the official way of approving a patch. Once you've done that I'll re-assign to Karolin for inclusion in 3.6.1.

Thanks !

Jeremy.
Comment 5 Guenter Kukkukk 2011-09-15 01:15:15 UTC
I have the "details" link open, but how do i change the review flag?
Probably i'm not in the list of "allowed reviewers"?

Temp. screenshot (will stay for about 1 hour):
http://picpaste.com/pics/Bildschirmfoto7-2epAoZDP.1316047409.png
Comment 6 Jeremy Allison 2011-09-15 16:32:40 UTC
Are you logged into bugzilla from the linux@kukkukk.com account ? I thought that should be enough.
Jeremy.
Comment 7 Guenter Kukkukk 2011-09-15 17:30:17 UTC
Yes, i am using the account

linux@kukkukk.com

See http://picpaste.com/pics/Bildschirmfoto7-v91PJ0OO.1316107669.png
in the upper right.
(stays now 7 days)
Comment 8 Jeremy Allison 2011-09-21 18:33:30 UTC
Re-assigning to Karolin for inclusion in 3.6.1.
Jeremy.
Comment 9 Karolin Seeger 2011-09-22 19:55:12 UTC
Pushed to v3-6-test.
Closing out bug report.

Thanks!