Re: selftests: clone3: clone3_cap_checkpoint_restore fails - Could not set CAP_CHECKPOINT_RESTORE

From: Khannanov Lenar
Date: Fri May 24 2024 - 07:09:02 EST



I presume that test fails because of the difference between definition of struct _cap_struct (struct libcap in test). Commit aca076443591 (Make cap_t operations thread safe.) introduces mutex field at the beginning of the structure. Test uses own definition to set CAP_CHECKPOINT_RESTORE. As data member of these two versions of structures is at the different offsets, CAP_CHECKPOINT_RESTORE is lost and that's why cap_set_proc returns EPERM.


С уважением,
Ленар Ханнанов
Программист
Отдел разработки
АО "ИнфоТеКС" в г. Санкт-Петербург
190000, г. Санкт-Петербург, ул. Артиллерийская, д. 1, литер А, БЦ «Европа Хаус»
T: +7 495 737-61-92 ( доб. 7196)
Ф: +7 495 737-72-78


Lenar.Khannanov@xxxxxxxxxxx
www.infotecs.ru