Trash spec 0.4

Alexander Larsson alexl at
Thu Sep 9 18:43:21 EEST 2004

On Thu, 2004-09-09 at 16:33 +0200, David Faure wrote:
> On Thursday 09 September 2004 16:23, Alexander Larsson wrote:
> > On Thu, 2004-09-09 at 10:00 -0400, Sean Middleditch wrote:
> > > 
> > > Perhaps it's best to say that when restoring a file, it may only ever
> > > be
> > > restored to the exact same device the trash is on?  Following symlinks
> > > is OK so long as they are not followed off the device.
> > 
> > If you untrash using rename(2) or link(2)+unlink(2) you can't even get
> > this problem, since they would return EXDEV.
> > 
> > Of course, if you used trashing by copying to $home, then you're hosed.
> > And your rule would break untrashing files trashed in that way.
> No - the rule is different for $HOME.
> The home trash can accept trashed files from anywhere, with full paths, and is able
> to restore them anywhere.
> It's the trash in $topdir of a partition that has limitations: only relative paths,
> and only allow untrashing into the same partition (device).
> (I meant st_dev, not st_rdev, in the last mail)

I'm just talking about the rule sean proposed of only allowing
untrashing to the same device, to avoid the "symlink trojan" issue. That
would break copy-to-home.

 Alexander Larsson                                            Red Hat, Inc 
                   alexl at    alla at 
He's a Nobel prize-winning voodoo assassin moving from town to town, helping 
folk in trouble. She's an elegant hip-hop wrestler with an MBA from Harvard. 
They fight crime! 

More information about the xdg mailing list