lkml.org 
[lkml]   [1996]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Proposal: restrict link(2)
Date

> Why not just make link() create a symlink instead of throwing it away
> alltogether (yes and i know it might break some weird program somewhere,
> but it will do away with your supposed chown() bug)..
Ecch! God, no! One way of renaming files without having to own them
or make sure the permissions stay right or anything like that, is
ln old new && rm old (usually done in C, not shell, but the idea's there).
If ln works right, it renames old to new; if ln fails, nothing happens;
if ln succeeds but makes a symlink instead of a hard link, you get a
dangling link and lose the original file. Better to fail than to do the
wrong thing.

Keith

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.152 / U:4.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site