9front - general discussion about 9front
 help / color / mirror / Atom feed
From: kvik@a-b.xyz
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	[thread overview]
Message-ID: <B3B51AC595309F8391CE0AF78402B421@a-b.xyz> (raw)
In-Reply-To: <0C539553752FA1BAD2349A7EA7CF0902@felloff.net>

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.


  reply	other threads:[~2020-05-16 18:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 10:20 kvik
2020-05-13 13:34 ` [9front] " Ethan Gardener
2020-05-13 13:14   ` kvik
2020-05-14 13:28     ` Ethan Gardener
2020-05-14 12:20       ` kvik
2020-05-16 12:22   ` cinap_lenrek
2020-05-16 11:53     ` kvik
2020-05-16 18:04       ` cinap_lenrek
2020-05-16 14:04 ` cinap_lenrek
2020-05-16 16:08   ` kvik [this message]
2020-05-16 20:30     ` cinap_lenrek
2020-05-16 19:05       ` kvik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B3B51AC595309F8391CE0AF78402B421@a-b.xyz \
    --to=kvik@a-b.xyz \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).