From 764cb4600427c956b7addf402c6e7ceae4751d1c Mon Sep 17 00:00:00 2001 From: Jan Koester Date: Sat, 10 Oct 2026 14:31:16 +0200 Subject: [PATCH 38/43] devpts: allow UUID and GUID owners 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 --- fs/devpts/inode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 9844dcf35..1bdda468d 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;