From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from yow.a-b.xyz ([45.32.152.219]) by ewsd; Sat May 16 14:07:41 EDT 2020 Received: by yow.a-b.xyz (OpenSMTPD) with ESMTPSA id 297f9146 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Sat, 16 May 2020 20:07:31 +0200 (CEST) Message-ID: To: 9front@9front.org Subject: Re: [9front] [PATCH] rio: add -label wctl param; improve window(1) Date: Sat, 16 May 2020 18:08:54 +0200 From: kvik@a-b.xyz In-Reply-To: <0C539553752FA1BAD2349A7EA7CF0902@felloff.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: property SSL package-based shader-scale control I appreciate you taking the time to review. > otherwise you got a classical format string attack. Ouch! > about the -label flag in wctl message. i'm not so sure it is a good > idea. adding new flags there means a breaking change and updating rio > needs to be synchronized. > i think running window recursively is not really the issue. It's not an issue per se, but it seems we are only doing it the roundabout way because of wanting to label the new window while missing the -label parameter to do so. We also do the environment cleanup, but this only affects the -m case so it can be moved there. I'd argue that the label is a window property just like the others we are already setting through the 'new' wctl. I see no reason why it should be handled specially from the rest, or alternatively why other parameters shouldn't be set in a similar fashion by writing to /dev/wctl in new window's namespace. Introducing breakage is quite unfortunate, though I'm not entirely convinced it should be a single show stopper. > also we have the problem with quoting. (-cd also suffers from this). Yes, the field parser is janky and could be helped with a rewrite in terms of getfields(2). I can do it independently of this other stuff. > the real issue is that we have to properly preserve the arguments. > the bug is when we do $"cmd which destroys list tokenization. > a solution can be accomplished with rc's whatis, which lets rc > serialize a variable as a string that we can tunnel thru the wctl > text interface. Oh, wow, whatis is gold and I somehow missed the list serialization feature completely! I'll make use of it in a followup patch.