[PATCH] Add a "deltree" command to smbclient.

Jeremy Allison jra at samba.org
Fri Jul 7 15:54:19 UTC 2017


On Fri, Jul 07, 2017 at 09:14:37AM +0200, Andreas Schneider wrote:
> On Thursday, 6 July 2017 21:05:46 CEST Alexander Bokovoy wrote:
> > +       dt = talloc_zero(NULL, struct file_list);
> > +       if (dt == NULL) {
> > +               return NT_STATUS_NO_MEMORY;
> > +       }
> > +
> > +       /* create absolute filename for cli_ntcreate() */
> > +       dt->file_path = talloc_asprintf(dt,
> > +                               "%s%s%s",
> > +                               dir,
> > +                               CLI_DIRSEP_STR,
> > +                               finfo->name);
> > +       if (dt->file_path == NULL) {
> 
> TALLOC_FREE(dt);
> 
> missing, I've added it and pushed the patchset upstream

Thanks !

> > +               return NT_STATUS_NO_MEMORY;
> > +       }
> 
> 
> > +# Test smbclient deltree command
> > +test_deltree()
> > +{
> > +    tmpfile=$PREFIX/smbclient_interactive_prompt_commands
> > +    deltree_dir=$PREFIX/deltree_dir
> > +
> > +    rm -f $deltree_dir
> 
> And as this is a directory I think we want 'rm -rf'

Yes, that change is correct also.

Thanks a *LOT* for the review !

Jeremy.



More information about the samba-technical mailing list