DragonFly BSD
DragonFly commits List (threaded) for 2012-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: /bin/rm: fix removing symlinks with uchg/uappnd set


From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Nov 2012 15:45:47 -0800 (PST)

commit cbe044e0f12b5ae86a47b7ec1bc61bbe0ad785ad
Author: John Marino <draco@marino.st>
Date:   Fri Nov 16 00:31:35 2012 +0100

    /bin/rm: fix removing symlinks with uchg/uappnd set
    
    One error case described in FreeBSD PR bin/111226:
      /bin/rm when running as super user and failing to unlink a
      UF_APPEND|UF_IMMUTABLE protected symbolic link will reset the
      UF_APPEND and UF_IMMUTABLE flags on the symbolic link's target (if
      that target exists) - an object that /bin/rm should not touch! (Quote
      from SUSv3: "The rm utility removes symbolic links themselves, not
      the files they refer to, as a consequence of the dependence on the
      unlink() functionality").
    
    There was a failure case for /usr/bin/find as well, but swildner
    recently synchronized find with FreeBSD and fixed that one.
    
    Taken-from: FreeBSD SVN 193087 (30 MAY 2009)

Summary of changes:
 bin/rm/rm.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/cbe044e0f12b5ae86a47b7ec1bc61bbe0ad785ad


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]