Re: [PATCH] ksmbd: fail SET_INFO when the security descriptor cannot be stored
From: Namjae Jeon
Date: Wed Nov 18 2026 - 19:52:57 EST
> diff --git a/fs/smb/server/smbacl.c b/fs/smb/server/smbacl.c
> index a87c22fa9a6e..3770dda2b3ed 100644
> --- a/fs/smb/server/smbacl.c
> +++ b/fs/smb/server/smbacl.c
> @@ -1984,7 +1984,14 @@ int set_info_sec(struct ksmbd_conn *conn, struct ksmbd_tree_connect *tcon,
> if (test_share_config_flag(tcon->share_conf, KSMBD_SHARE_FLAG_ACL_XATTR)) {
> /* Update WinACL in xattr */
> ksmbd_vfs_remove_sd_xattrs(idmap, path);
> - ksmbd_vfs_set_sd_xattr(conn, idmap, path, pntsd, ntsd_len);
> + rc = ksmbd_vfs_set_sd_xattr(conn, idmap, path, pntsd, ntsd_len);
> + /*
> + * The CREATE context (type_check) stays best effort because
> + * the file exists already. A filesystem without the xattr is
> + * not an error either.
> + */
> + if (type_check || rc == -EOPNOTSUPP)
> + rc = 0;
-ENOMEM and -E2BIG fall through to STATUS_INVALID_INFO_CLASS. Please
map -ENOMEM to STATUS_INSUFFICIENT_RESOURCES and assign an appropriate
status to -E2BIG.
Thanks.