Kern Sibbald writes: 

>> 
>> patch-src-findlib-attribs.c
>>   when restoring a symlink, use lchflags to restore the file flags
>>   defined for the symlink ("new feature")
>>   when restoring a hardlink, don't call chmod, chown, utime because it is
>>   a hardlink and don't  have such attributes (as far as I know, if someone
>>   with more FS-foo can step up and confirm this?). Changing this
>>   attributes will change the sourcefiles attributes which is probably not
>>   what is wanted here anyway....
> 
> I'll have to think about this a bit more.  However, I don't think it is 
> correct to skip setting the attributes.  To understand hardlinks, the first 
> thing is to realize that the name is slightly misleading.  A hard link is not 
> really a link.  The data for the two files the attributes are one and the 
> same.  The situation is very different from a softlink where there is a 
> separate directory entry that "points" to an existing file.   
> 
> Thus to properly restore a hardlink you must also reset the attributes or you 
> could potentially end up with incorrect attributes (owner, modes, ...).

Ok, but from my understanding setting attributes on a hardlink changes the 
attributes of the inode the hardlink is pointing to, like for "normal" files 
which are technically hardlinks too. So changing attributes for n "objects" 
pointing to the same inode is like changing the attributes n times for the 
same object or is this wrong?
If you think attributes for hardlinks have to be restored as well, the fix 
for src/findlib/attribs.c has to be redone. I can do so but I still 
think.... ;)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to