lkml.org 
[lkml]   [1998]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: hardlinks.... sucks... ;-(
Hi!


> >> No. You just need other tool than chown, you need tool that changes
> >> uid->uid. And you run it as chown -from olduser -to newuser -R /,
> >> which looks for all files owned by olduser and makes newuser own
> >> them. Just go ahead and write this tool. (And mail me a copy ;-). (I
> >> would also appredicate option to delete such files).
> >
> > Try something a bit like one of the following:
> >
> > find / -user 1234 -print | xargs chown 4321
> > find / -user 1234 -print | xargs rm
> > find / -user 1234 -exec chown 4321 {} ;
> > find / -user 1234 -exec rm {} ;
>
> Alright now, how many people would do that? :-)
>
> 1. the file is found by "find"
> 2. the user removes it and makes a link
> 3. the "chown" command runs
>
> It seems a file starting with "-" could cause trouble too.
> Maybe a name like "--follow-symlinks" would be interesting.

Seems to me like what I proposed somewhere up in thread - new utility
to do this safely...

> Link and symlink restrictions would help protect us from
> our luserness. Arrogance has no place in security.

Well, I'm not sure if I want to break compatibility to protect myself
from [not-so-]stupid errors.

Well, but with that race condition above... It *might* be kernel issue
after all. Enlighten me: how is this operation done safely?

Pavel

--
Do *NOT* buy software, GNU software is better and free! Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.374 / U:0.064 seconds]
©2003-2011 Jasper Spaans. Advertise on this site