Bug 52016 - CIFS cannot gain access to a file when fanotify works with OPEN_PERM
Summary: CIFS cannot gain access to a file when fanotify works with OPEN_PERM
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: kernel-image-6.12 (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: kernelbot@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-11 20:27 MSK by Evgeny Shesteperov
Modified: 2024-11-12 12:03 MSK (History)
4 users (show)

See Also:


Attachments
fanotify.c (7.31 KB, text/x-csrc)
2024-11-11 20:28 MSK, Evgeny Shesteperov
no flags Details
test.sh (2.34 KB, application/x-shellscript)
2024-11-11 20:28 MSK, Evgeny Shesteperov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Evgeny Shesteperov 2024-11-11 20:27:55 MSK
Версия

-   6.6.60-6.6-alt1
-   6.11.7-6.11-alt1
-   6.12.0-6.12-alt0.rc7

Стенд

-   ALT Server 11 (Sisyphus) - Samba DC
-   ALT Workstation K 11 (Sisyphus) - Samba Client

Шаги Воспроизведения

1.  Создать test2.docx на share (в примере //dc/share)
2.  Примонтировать share:

    # mkdir -p /mnt/boxes
    # mount -v -t cifs -o user=testuser //dc/share /mnt/boxes && l /mnt/boxes

3.  Скачать тестовые файлы из attachments: (test.sh, fanotify.c)

4.  Выполнить fanotify:

    # apt-get install -y gcc glibc-devel
    # gcc -o fanotify fanotify.c -lpthread
    # ./fanotify /mnt/boxes

5.  Выполнить test.sh:

    chmod +x test.sh
    ./test.sh

Ожидаемый результат: Вывод в конце Everything looks OK

Фактический результат:
mv: невозможно переместить '/mnt/boxes/lu578719utat3.tmp' в '/mnt/boxes/test2.docx': Отказано в доступе

Взято из Bugzilla RedHat ->
https://bugzilla.redhat.com/show_bug.cgi?id=2210795

Воспроизводится в P10.
Comment 1 Evgeny Shesteperov 2024-11-11 20:28:35 MSK
Created attachment 17165 [details]
fanotify.c
Comment 2 Evgeny Shesteperov 2024-11-11 20:28:55 MSK
Created attachment 17166 [details]
test.sh