bugfindutils - Bugs: bug #64900, Cannot search for files/folders...

 
 

bug #64900: Cannot search for files/folders with user/group id bigger than 2147483647

Submitter:  Jocelyn Le Sage <jlesage>
Submitted:  Thu 16 Nov 2023 01:49:03 PM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  berny
Originator Name:  Open/Closed:  Open
Release:  4.9.0 Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 02 Jan 2024 08:32:22 AM UTC, comment #2: 

Pushed (together with the new-year's commits).

Bernhard Voelker <berny>
Group administrator
Sat 30 Dec 2023 08:49:03 PM UTC, comment #1: 

Good spot!

The attached fixes it by allowing for -user/-group to accept
numerical UID/GID numbers until UID_T_MAX/GID_T_MAX respectively.

Pushing soon.

(file #55492)

Bernhard Voelker <berny>
Group administrator
Thu 16 Nov 2023 01:49:03 PM UTC, original submission:  

The find utility considers the numerical value of a user/group id as a signed integer.  This is wrong since linux supports unsigned 32 bits numerical IDs.

Thus, the maximum ID that can be provided to find is 2147483647.  With an ID higher than that, find fails with the error Result not representable.  For example:

# find /tmp -user 2147483647
# find /tmp -user 2147483648
find: 2147483648: Result not representable

Using higher ID is supported by Linux.  Here is another example illustrating the problem.

# touch /tmp/test
# chown 3634365583:3634365583 /tmp/test
# ls -l /tmp/test
-rw-r--r-- 1 3634365583 3634365583 0 Nov 14 15:10 /tmp/test
# find /tmp -user 3634365583
find: 3634365583: Result not representable

I would expect find to be able to handle an ID of 3634365583.

Here is the version of find I'm using:

find --version
find (GNU findutils) 4.9.0
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Eric B. Decker, James Youngman, and Kevin Dalley.
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2)

Jocelyn Le Sage <jlesage>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #55492:  0001-find-allow-user-group-to-accept-larger-integers-beyo.patch added by berny (13KiB - text/x-patch - [PATCH] find: allow -user,-group to accept larger integers beyond INT_MAX)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by berny (Updated the item)
  • -email is unavailable- added by jlesage (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-01-02 berny StatusCode Review Fixed
    2023-12-30 berny Attached File- Added 0001-find-allow-user-group-to-accept-larger-integers-beyo.patch, #55492
        StatusNone Code Review
        Assigned toNone berny

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code