Ticket #4643 (accepted defect)

Opened 6 hours ago

Last modified 5 hours ago

Stop faking current user uid/gid in extfs

Reported by: zaytsev Owned by: zaytsev
Priority: major Milestone: 4.8.34
Component: mc-vfs Version: master
Keywords: Cc:
Blocked By: Blocking: #3147
Branch state: on review Votes for changeset:

Description

Currently, we have a completely inconsistent way of addressing uid / gid in our extfs scripts.

Here is an assortment of what we do in different cases:

  1. Fake current user uid/gid
  2. Fake current user uid, but set gid to 0
  3. Fake uid/gid from file stat
  4. Fake uid from file stat, set gid to 0
  5. Always return 0/0

Sometimes numeric and sometimes symbolic names are returned.

This makes testing difficult and in particular next to impossible to make the test suite run as root.

My suggestion is to always return 0/0, if the FS in question does not have information about uid/gid, instead of doing 1.-4. Only if the FS does have this information, try to translate it appropriately.

My understanding is that mc will take current user uid/gid upon copyout anyways, so faking is not necessary. Going for 0/0 doesn't present any disadvantage I can think of.

Change History

comment:1 Changed 5 hours ago by zaytsev

  • Status changed from new to accepted
  • Owner set to zaytsev
  • Branch state changed from no branch to on review

Branch: 4643_stop_fake_uid_gid_extfs
Initial changeset: d0f3e26cae4a4ac45c6115746031047954df846c

comment:2 Changed 5 hours ago by zaytsev

  • Blocking 3147 added
Note: See TracTickets for help on using tickets.