Bug 587 - smbcontrol close-share doesn't work if PID not specified
Summary: smbcontrol close-share doesn't work if PID not specified
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.0.0
Hardware: All All
: P3 normal
Target Milestone: none
Assignee: Jelmer Vernooij
QA Contact:
Depends on:
Reported: 2003-10-08 17:43 UTC by Shiro Yamada
Modified: 2004-12-09 03:29 UTC (History)
2 users (show)

See Also:

Allow to call smbcontrol with the daemon name (913 bytes, patch)
2004-12-08 15:27 UTC, Lars Müller
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shiro Yamada 2003-10-08 17:43:39 UTC
I have tested smbcontrol in Samba 3.0 on my Linux box and
faced with a problem.

Referring to smbcontrol usage, it states that the
<destination> parameter can be either one of "smbd", "nmbd"
or actual PID.

While specifying PID as <destination> within the command-
line would close down the client connetion as intended,
however, specifying "smbd" does not have any effect on
the connection.

	$ smbcontrol PID close-share SHARE   works
	$ smbcontrol smbd close-share SHARE  doesn't work

Is this a bug, or just a feature of this tool?

Comment 1 Lars Müller 2004-12-08 15:29:00 UTC
Created attachment 831 [details]
Allow to call smbcontrol with the daemon name

First hunk: Return from traverse_fn() if crec.cnum is -1.  Am I correct that
this isn't a connection so we return without doing anything?

Second hunk: Set in make_connection_snum() the flags of this connection with
claim_connection() to FLAG_MSG_GENERAL|FLAG_MSG_SMBD

I'm not sure if we need FLAG_MSG_GENERAL here.	At least we need FLAG_MSG_SMBD
to be set to allow traverse_fn() to work.

Please advice.
Comment 2 Lars Müller 2004-12-08 15:55:05 UTC
This patch is wrong.  Sorry for the noise.  Just discussed with Jerry about
this.  This should now be fixed with the current svn version.  I'll check this
and if it the bug is fixed mark this a fixed/ verified.
Comment 3 Lars Müller 2004-12-09 03:29:21 UTC
Fixed with svn checkin 4018.