bugfindutils - Bugs: bug #14922, find should show a warning on...


bug #14922: find should show a warning on unreadable mtab

Submitted by:  Andreas Metzler <ametzler>
Submitted on:  Sun 06 Nov 2005 11:03:35 AM UTC  
Category:  find Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  James Youngman <jay>
Originator Name:  Open/Closed:  Closed
Release:  4.2.26 Fixed Release:  None

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 11 Nov 2005 07:50:04 AM UTC, comment #1: 

If find needs to produce output but cannot produce correct output, it must fail with a fatal exit status, unless the difference in the output cannot ever be harmful. 

Hence if we need data from /etc/mtab but cannot get it, we must exit with a nonzero status so that the caller knows not to trust our output. 

Conversely, if the whole operation of find does not need the data from /etc/mtab, and the data is not available, the exit status is zero because the non-availability of the informaiton was irrelevant. 

I have updated the CVS code appropriately.   Also the NEWS file. 

James Youngman <jay>
Project AdministratorIn charge of this item.
Sun 06 Nov 2005 11:03:35 AM UTC, original submission:  

ametzler@argenau:/tmp/findutils-rel-4-2-fixes$ find foo -printf '%F\n'
ametzler@argenau:/tmp/findutils-rel-4-2-fixes$ ls -l /etc/mtab
-rw-r-----  1 root root 378 2005-11-06 11:19 /etc/mtab

This is caused by ./find/fstype.c not checking whether gnulib's read_file_system_list returns NULL.

It might be a good idea to show a warning in this case, using something like this:

if (NULL == entries) {
  printf("cannot read table of mounted filesystems:%s\n",strerror(errno));

(It actually should use error() instead obviously.)
               thanks, cu andreas

Andreas Metzler <ametzler>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-11-19 jay Open/ClosedOpen => Closed
    Release4.2.25 => 4.2.26
2005-11-11 jay StatusNone => Fixed
    Assigned toNone => jay

Back to the top

Powered by Savane 3.6