Changes between Initial Version and Version 10 of Ticket #17


Ignore:
Timestamp:
01/11/14 15:41:28 (6 years ago)
Author:
ossi
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17

    • Property Status changed from new to reopened
    • Property Cc dgunchev@…, gotar@… added
    • Property Component changed from mc-vfs to mc-core
    • Property Version changed from to master
    • Property Branch state changed from to no branch
    • Property Milestone changed from to Future Releases
  • Ticket #17 – Description

    initial v10  
    77||Release:||current (CVS or snapshot)||Operating System:||All|| 
    88 
    9 Discussion: 
     9Original submission: 
    1010{{{ 
    11 Tue 02 Aug 2005 07:51:51 AM UTC, comment #7: 
    12  
    13 I also think that those complaints are reasonable, but I don't  
    14 understand what this has to do with anything ?! :) 
    15  
    16 So far, if I've read the discussion correctly, I've understand that  
    17 you also agree that both lchown() and chown() have to be used -  
    18 depending on the task that has to be performed. So do you still  
    19 think mc_lchown() is wrong ? If so - why do you think so ? 
    20         Pavel Tsekov <ptsekov> 
    21 Project Administrator 
    22 Mon 01 Aug 2005 04:55:59 PM UTC, comment #6: 
    23  
    24 Well, in that case I will use chown command. I heard complains  
    25 about current behaviour and I found these complains reasonable. 
    26         Andrew V. Samoilov <sav> 
    27 Project MemberIn charge of this item. 
    28 Mon 01 Aug 2005 02:55:55 PM UTC, comment #5: 
    29  
    30 What happens if you want to work on the target of the symlink and  
    31 not on the link itself ? readlink() followed by lchown () ? 
    32         Pavel Tsekov <ptsekov> 
    33 Project Administrator 
    34 Mon 01 Aug 2005 02:40:32 PM UTC, comment #4: 
    35  
    36 IMHO it's wrong idea to introduce mc_lchown(). 
    37 Also if local_chown() will use lchown() we will fix bug with C-x O  
    38 for symlinks. Now it change ownership for target of symlink. 
    39 We can call mc_chown() after make_symlink(). 
    40         Andrew V. Samoilov <sav> 
    41 Project MemberIn charge of this item. 
    42 Sat 16 Jul 2005 01:30:48 PM UTC, comment #3: 
    43  
    44 Maybe we should keep the chown() call in local_chown() and  
    45 introduce a new function called local_lchown() ? Then we use the  
    46 appropriate call based on the value of 'follow Links' ? In any case  
    47 currently MC doesn't support changing the ownership of the link  
    48 when the link is copied: 
    49  
    50 if (S_ISLNK (sb.st_mode)) { 
    51 int retval; 
    52  
    53 retval = make_symlink (ctx, src_path, dst_path); 
    54 return retval; 
    55 } 
    56  
    57 This is the block of code dealing with symlinks in copy_file_file(). 
    58         Pavel Tsekov <ptsekov> 
    59 Project Administrator 
    60 Sat 16 Jul 2005 09:29:22 AM UTC, comment #2: 
    61  
    62 man 2 chown 
    63 In versions of Linux prior to 2.1.81 (and distinct from 
    64 2.1.46), chown did not follow symbolic links. Since Linux 
    65 2.1.81, chown does follow symbolic links, and there is a 
    66 new system call lchown that does not follow symbolic 
    67 links. Since Linux 2.1.86, this new call (that has the 
    68 same semantics as the old chown) has got the same syscall 
    69 number, and chown got the newly introduced number. 
    70  
    71 So we need to check one more function in configure and use lchown() 
    72 insteod of chown() in the vfs/local.c if HAVE_LCHONW. 
    73         Andrew V. Samoilov <sav> 
    74 Project MemberIn charge of this item. 
    75 Thu 07 Jul 2005 12:33:11 PM UTC, comment #1: 
    76  
    77 Confirmed. I'll be working on this. 
    78         Pavel Tsekov <ptsekov> 
    79 Project Administrator 
    80 Fri 17 Jun 2005 10:35:17 AM UTC, original submission: 
    81  
    8211(More info on: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314387 ) 
    8312 
     
    9726timj.timj as it works with files.  
    9827}}} 
     28 
     29Comment 1 by Pavel Tsekov <ptsekov> at Thu 07 Jul 2005 12:33:11 PM UTC: 
     30{{{ 
     31Confirmed. I'll be working on this. 
     32}}} 
     33 
     34Comment 2 by Andrew V. Samoilov <sav> at Sat 16 Jul 2005 09:29:22 AM UTC: 
     35{{{ 
     36man 2 chown 
     37In versions of Linux prior to 2.1.81 (and distinct from 
     382.1.46), chown did not follow symbolic links. Since Linux 
     392.1.81, chown does follow symbolic links, and there is a 
     40new system call lchown that does not follow symbolic 
     41links. Since Linux 2.1.86, this new call (that has the 
     42same semantics as the old chown) has got the same syscall 
     43number, and chown got the newly introduced number. 
     44 
     45So we need to check one more function in configure and use lchown() 
     46insteod of chown() in the vfs/local.c if HAVE_LCHONW. 
     47}}} 
     48 
     49Comment 3 by Pavel Tsekov <ptsekov> at Sat 16 Jul 2005 01:30:48 PM UTC: 
     50{{{ 
     51Maybe we should keep the chown() call in local_chown() and  
     52introduce a new function called local_lchown() ? Then we use the  
     53appropriate call based on the value of 'follow Links' ? In any case  
     54currently MC doesn't support changing the ownership of the link  
     55when the link is copied: 
     56 
     57if (S_ISLNK (sb.st_mode)) { 
     58int retval; 
     59 
     60retval = make_symlink (ctx, src_path, dst_path); 
     61return retval; 
     62} 
     63 
     64This is the block of code dealing with symlinks in copy_file_file(). 
     65}}} 
     66 
     67Comment 4 by Andrew V. Samoilov <sav> at Mon 01 Aug 2005 02:40:32 PM UTC: 
     68{{{ 
     69IMHO it's wrong idea to introduce mc_lchown(). 
     70Also if local_chown() will use lchown() we will fix bug with C-x O  
     71for symlinks. Now it change ownership for target of symlink. 
     72We can call mc_chown() after make_symlink(). 
     73}}} 
     74 
     75Comment 5 by Pavel Tsekov <ptsekov> at Mon 01 Aug 2005 02:55:55 PM UTC: 
     76{{{ 
     77What happens if you want to work on the target of the symlink and  
     78not on the link itself ? readlink() followed by lchown () ? 
     79}}} 
     80 
     81Comment 6 by Andrew V. Samoilov <sav> at Mon 01 Aug 2005 04:55:59 PM UTC: 
     82{{{ 
     83Well, in that case I will use chown command. I heard complains  
     84about current behaviour and I found these complains reasonable. 
     85}}} 
     86 
     87Comment 7 by Pavel Tsekov <ptsekov> at Tue 02 Aug 2005 07:51:51 AM UTC: 
     88{{{ 
     89I also think that those complaints are reasonable, but I don't  
     90understand what this has to do with anything ?! :) 
     91 
     92So far, if I've read the discussion correctly, I've understand that  
     93you also agree that both lchown() and chown() have to be used -  
     94depending on the task that has to be performed. So do you still  
     95think mc_lchown() is wrong ? If so - why do you think so ? 
     96}}}