Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Oct 2014 05:44:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 194132] New: rm(1) is ignoring more errors than it should in rm_tree(..)
Message-ID:  <bug-194132-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194132

            Bug ID: 194132
           Summary: rm(1) is ignoring more errors than it should in
                    rm_tree(..)
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: ngie@FreeBSD.org

This code in bin/rm/rm.c catches more errors than it should:

338         if (!fflag && errno)
339                 err(1, "fts_read");
340         fts_close(fts);
341 }

In particular, the code will mask errors if fts_read fails with anything other
than EACCES, ENOENT, or EPERM according to the intent of -f in rm(1):

     -f      Attempt to remove the files without prompting for confirmation,
             regardless of the file's permissions.  If the file does not
             exist, do not display a diagnostic message or modify the exit
             status to reflect an error.  The -f option overrides any previous
             -i options.

Please see the related bug for more details.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194132-8>