diff options
| author | ChenXiaoSong <chenxiaosong@kylinos.cn> | 2026-08-05 05:11:11 +0000 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-08-17 22:38:20 +0900 |
| commit | 6a8292d379d640ad2cfba9caa9c74da5390b498f (patch) | |
| tree | e7b4f3b1d77d87d7b233e0d6178155627b6ded88 /scripts/stackusage | |
| parent | 1e3b4b4f7768126e365d9b74246f2f26a3b6fda3 (diff) | |
| download | linux-6a8292d379d640ad2cfba9caa9c74da5390b498f.tar.gz linux-6a8292d379d640ad2cfba9caa9c74da5390b498f.zip | |
smb/server: deny overwriting targets with non-POSIX opens
Reproducer:
1. server: systemctl start ksmbd
2. client: mount without `posix` option
mount -t cifs //${server_ip}/export /mnt
3. client: touch /mnt/file1 /mnt/file2
4. client: C program: int fd = open("/mnt/file2", O_RDONLY);
5. client: C program: rename("/mnt/file1", "/mnt/file2");
6. client: C program: struct stat stbuf; fstat(fd, &stbuf);
stbuf.st_nlink is 1, should be 0
This patch fixes xfstests generic/035 when mounted without `posix` option.
Suggested-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
