patchGNU tar - Patches: patch #10488, Fix missing type in mknodat() mode...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10488: Fix missing type in mknodat() mode argument

Submitter:  Anssi Hannula <anssibw>
Submitted:  Thu 14 Nov 2024 01:38:19 PM UTC
   
 
Category:  Operations on Archives Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Thu 14 Nov 2024 01:38:19 PM UTC, original submission:  

Per POSIX, the type of the file to be created should be OR'ed to the
`mode` argument of mknodat().

However, set_xattr() creates an empty file using mknodat() and does not
do that.

E.g. Linux kernel considers zero type as S_IFREG, so the code works on
most systems.

However, e.g. fakeroot, at least up to the current v1.36, does not
consider 0 as S_IFREG, instead creating an invalid file, causing tar to
enter an infinite retry loop when trying to create a file with xattrs
under fakeroot.

Since the current code is incorrect per POSIX, simply fix that by
calling mknodat() with S_IFREG.

This will cause no behavior difference on systems where 0 already was
considered S_IFREG.

Anssi Hannula <anssibw>

 

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

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by anssibw (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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-11-14 anssibw Attached File- Added 0001-Fix-missing-type-in-mknodat-mode-argument.patch, #56614

    Back to the top

    Powered by Savane 3.14-04e1.
    Corresponding source code