[RFC PATCH v2 38/41] devpts: allow UUID and GUID owners
Jan Koester
jan.koester at tuxist.de
Wed Oct 21 03:15:58 UTC 2026
Terminals are given to the user of a login session: sshd and login
chown the slave to the user, and a pty opened by a UUID or GUID user
gets that user as its owner. devpts keeps owners in its inodes only,
so like tmpfs and ramfs it can hold any kind of owner: set SB_I_UID_R.
Without it, sshd's chown() of the pty of a UUID user fails with
-EOVERFLOW and the session is closed.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jan Koester <jan.koester at tuxist.de>
---
fs/devpts/inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 9844dcf354..1bdda468d7 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -363,6 +363,8 @@ static int devpts_fill_super(struct super_block *s, struct fs_context *fc)
struct inode *inode;
s->s_iflags &= ~SB_I_NODEV;
+ /* owners live in memory only, a UUID or GUID one as well */
+ s->s_iflags |= SB_I_UID_R;
s->s_blocksize = 1024;
s->s_blocksize_bits = 10;
s->s_magic = DEVPTS_SUPER_MAGIC;
--
2.56.0
More information about the Linux-security-module-archive
mailing list