[PATCH] fix a bug in smbget

Andreas Schneider asn at samba.org
Mon Jan 25 08:13:48 UTC 2016

On Monday 25 January 2016 09:01:48 Christian Ambach wrote:
> Hi Andreas,
> Am 25.01.16 08:06, schrieb Andreas Schneider:
> >> the attached patchset contains a fix and some code cleanup for smbget.
> >> The first patch fixes the actual bug that the recursive download only
> >> works if the local username equals the username to be used for the SMB
> >> server to connect to.
> I've just realized that I have used a C++ style comment in this patch,
> so I have attached a new version of the patchset using a the correct
> comment style.
> >> The rest of the patches are code cleanups to adopt the code to the
> >> coding standards and to make use of some C99 features.
> > 
> > I will review your patchset. I've started with smbget cleanup ~5 weeks
> > ago.
> > But I first tried to fix the option parsing, as it is broken too.
> > 
> > Maybe you want to take a look at:
> > 
> > https://git.samba.org/?p=asn/samba.git;a=commitdiff;h=7b9453c6510a99875cf0
> > beef73bb2ab8476f1c6f
> I like your idea of having a struct which stores all of the options
> instead of having all of these global variables. I have not looked at
> broken logic in the tool yet, just at the cosmetics.
> So your work will be a useful next step on top of mine.

The problem is username and password parsing from the command line. If you 
specify it at the moment, smbget will still ask for it.

I also do not really like that -U is not for username%password. That's why I 
changed -u for update and -U for username so it is consistent with the rest of 
Samba client tools.

Let me know when I should rebase my patch. I'm happy to review more patches in 
this area.


	-- andreas

Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org

More information about the samba-technical mailing list