Package: coreutils
Version: 5.2.1-2

chown(1) behaves as if the -h option were specified, even
if it is not. For instance:

    # touch Q
    # ln -s Q R
    # ls -ln Q R
    -rw-r--r--  1 0 0 0 2005-12-09 19:21 Q
    lrwxrwxrwx  1 0 0 1 2005-12-09 19:21 R -> Q
    # chown 65535:65535 R
    # ls -ln Q R
    -rw-r--r--  1     0     0 0 2005-12-09 19:21 Q
    lrwxrwxrwx  1 65535 65535 1 2005-12-09 19:21 R -> Q

-- that should have changed the ownership of Q. If we
pass the nonstandard option --dereference, we get the
default behaviour:

    # chown --dereference 65534:65534 R
    # ls -ln Q R
    -rw-r--r--  1 65534 65534 0 2005-12-09 19:21 Q
    lrwxrwxrwx  1 65535 65535 1 2005-12-09 19:21 R -> Q

This is correct in the current GNU version of coreutils
(5.93) and broken in 5.2.1.

I believe that the following patch is sufficient to fix
the problem:

--- coreutils-5.2.1/src/chown-core.c.orig       Fri Dec  9 19:31:24 2005
+++ coreutils-5.2.1/src/chown-core.c    Fri Dec  9 19:31:32 2005
@@ -46,7 +46,7 @@
 {
   chopt->verbosity = V_off;
   chopt->root_dev_ino = NULL;
-  chopt->affect_symlink_referent = false;
+  chopt->affect_symlink_referent = true;
   chopt->recurse = false;
   chopt->force_silent = false;
   chopt->user_name = 0;


-- 
``There has to be a balance between telling the truth and reassurance.''
  (David Blunkett, on terrorist alerts)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to