Anonymous | Login | Signup for a new account | 11-10-2008 10:46 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0000310 | [BusyBox] Security | minor | always | 06-25-05 17:58 | 12-14-05 17:21 | ||||
Reporter | Looxix | View Status | public | ||||||
Assigned To | BusyBox | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 1.00 | ||||||
Summary | 0000310: chmod & chown mixup of permissions with symlinks | ||||||||
Description |
Trying to change the owner of a symlink can also change (increase) the permissions of the target of the symlink. For example: # ls -l total 4 -rw-r--r-- 1 luc users 2 Jun 21 00:50 f lrwxrwxrwx 1 luc users 1 Jun 21 00:50 l -> f # chown root.root * # ls -l total 4 -rwxrwxrwx 1 root root 2 Jun 21 00:50 f ^^^^^^^^ lrwxrwxrwx 1 root root 1 Jun 21 00:50 l -> f The problem come from the fact that recursive_action() use lstat() but the chown applet use in its action chown() and not lchown(). I think that either lstat()/lchown() or stat()/chown() must be used but not a mix of the two. With the following patch chown have the same behaviour as the GNU one and do the same for chmod that suffer from the same problem. I have not really checked but from the code it seems that chgrp must not be corrected since it use already lchown(). |
||||||||
Additional Information | |||||||||
Attached Files | chown-chmod.patch [^] (839 bytes) 06-25-05 17:58 | ||||||||
|
Copyright © 2000 - 2006 Mantis Group |