From 488ee56cf77e6cd840a9ef492af7ed6225773931 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 30 Apr 2021 03:39:39 +0200 Subject: [PATCH] Kernel: chmod()/chown() for PTYs should return EROFS All the other methods already do this and this is also what OpenSSH expects when trying to change modes/ownership for devpts files. --- Kernel/FileSystem/DevPtsFS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/FileSystem/DevPtsFS.cpp b/Kernel/FileSystem/DevPtsFS.cpp index 1546b3cd3a..b1df786fe5 100644 --- a/Kernel/FileSystem/DevPtsFS.cpp +++ b/Kernel/FileSystem/DevPtsFS.cpp @@ -182,12 +182,12 @@ KResult DevPtsFSInode::remove_child(const StringView&) KResult DevPtsFSInode::chmod(mode_t) { - return EPERM; + return EROFS; } KResult DevPtsFSInode::chown(uid_t, gid_t) { - return EPERM; + return EROFS; } }