[Fwd: Common recycle bin (PATCH#1083)]

Simo Sorce simo.sorce at xsec.it
Sun Oct 20 09:01:00 GMT 2002


How do you get access to the recycle bin folder then ??
It's not a good idea imho, as a share maybe completely virtual and
backend from a different thing then a filesystem, and moving towards to
stackable modules will make it wrong to assume we can really reach the
root of the local machine filesystem.

Simo.

On Sat, 2002-10-19 at 12:17, Andrew Bartlett wrote:
> Does sombody who has worked with the recycle bin want to comment on this
> patch?
> 
> Andrew Bartlett
> 
> -------- Original Message --------
> Subject: Common recycle bin (PATCH#1083)
> Date: Fri, 18 Oct 2002 09:56:20 -0400 (EDT)
> From: d.sbragion at infotecna.it
> To: jeremy at samba.org, tridge at samba.org, abartlet at samba.org
> CC: samba-patches at samba.org
> 
> Hello,
> 
> this patch allow for a recycle bin in common to all the shares of a
> samba 
> server. Whenever the recycle directory (name parameter of recycle.conf) 
> starts with a '/' the absolute pathname is used to move the deleted file 
> instead of building the destination directory starting from the share
> root 
> directory. Using a %S at the end of the directory name helps keeping
> file 
> separated for each share. This ease the automatic deletion of old
> recycled 
> files, because you don't have to follow directories all over the file 
> system to find alla the recycle bins created. Relevant versions: samba 
> 2.2.6, redhat 7.3, kernel 2.4.18. The patch its really simple so it
> should 
> work with any architecture. Unidiff follows:
> -----------------------------------------
> 
> --- recycle.c.orig      Fri Oct 18 15:49:29 2002
> +++ recycle.c   Fri Oct 18 15:53:27 2002
> @@ -256,7 +256,7 @@
>                  DEBUG(10, ("pm_process returned %d\n", rc));
>          }
>          standard_sub_conn( conn ,
> current->recycle_bin,sizeof(pstring));
> -       trim_string(current->recycle_bin,"/","/");
> +       trim_string(current->recycle_bin,NULL,"/");
>          conn->vfs_private= (void *)current;
>          return 0;
>   }
> @@ -323,6 +323,8 @@
>          pstring newdir;
> 
>          *newdir='\0';
> +       if (dname[0] == '/')
> +               pstrcat(newdir,"/");
>          mode=S_IREAD|S_IWRITE|S_IEXEC;
>          pstrcpy(tempstr,dname);
>          y=tempstr;
> 
> ------------------------------
> 
> Bye!
> --
> 	Denis Sbragion
> 	InfoTecna
> 	Tel: +39 0362 805396, Fax: +39 0362 805404
> 	URL: http://www.infotecna.it
-- 
Simo Sorce - simo.sorce at xsec.it
Xsec s.r.l.
via Durando 10 Ed. G - 20158 - Milano
tel. +39 02 2399 7130 - fax: +39 02 700 442 399
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20021020/53497f83/attachment.bin


More information about the samba-technical mailing list