Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 315647 Details for
Bug 433690
chown -R breaks -P and always follows symlinks
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed patch
coreutils-5.2.1-chown.patch (text/plain), 1.80 KB, created by
Kamil Dudka
on 2008-09-03 14:31:21 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Kamil Dudka
Created:
2008-09-03 14:31:21 UTC
Size:
1.80 KB
patch
obsolete
>diff -ruNp coreutils-5.2.1.orig/src/chown.c coreutils-5.2.1/src/chown.c >--- coreutils-5.2.1.orig/src/chown.c 2008-09-03 16:08:42.000000000 +0200 >+++ coreutils-5.2.1/src/chown.c 2008-09-03 16:10:21.000000000 +0200 >@@ -170,6 +170,10 @@ main (int argc, char **argv) > /* Bit flags that control how fts works. */ > int bit_flags = FTS_PHYSICAL; > >+ /* 1 if --dereference, 0 if --no-dereference, -1 if neither has been >+ specified. */ >+ int dereference = -1; >+ > struct Chown_option chopt; > int fail; > int optc; >@@ -193,7 +197,7 @@ main (int argc, char **argv) > break; > > case 'H': /* Traverse command-line symlinks-to-directories. */ >- bit_flags = FTS_COMFOLLOW; >+ bit_flags = FTS_COMFOLLOW | FTS_PHYSICAL; > break; > > case 'L': /* Traverse all symlinks-to-directories. */ >@@ -205,12 +209,12 @@ main (int argc, char **argv) > break; > > case 'h': /* --no-dereference: affect symlinks */ >- chopt.affect_symlink_referent = false; >+ dereference = 0; > break; > > case DEREFERENCE_OPTION: /* --dereference: affect the referent > of each symlink */ >- chopt.affect_symlink_referent = true; >+ dereference = 1; > break; > > case NO_PRESERVE_ROOT: >@@ -259,6 +263,28 @@ main (int argc, char **argv) > } > } > >+ if (chopt.recurse) >+ { >+ if (bit_flags == FTS_PHYSICAL) >+ { >+ if (dereference == 1) >+ error (EXIT_FAILURE, 0, >+ _("-R --dereference requires either -H or -L")); >+ chopt.affect_symlink_referent = false; >+ } >+ else >+ { >+ if (dereference == 0) >+ error (EXIT_FAILURE, 0, _("-R -h requires -P")); >+ chopt.affect_symlink_referent = true; >+ } >+ } >+ else >+ { >+ bit_flags = FTS_PHYSICAL; >+ chopt.affect_symlink_referent = (dereference != 0); >+ } >+ > if (argc - optind + (reference_file ? 1 : 0) <= 1) > { > error (0, 0, _("too few arguments"));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 433690
: 315647