[Bug 3609] Support the special ${RANDOM} environment variable

bugzilla-daemon at mindrot.org
Thu, 31 Aug 2023 03:18:55 -0000

Damien Miller <djm at mindrot.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |djm at mindrot.org

--- Comment #1 from Damien Miller <djm at mindrot.org> ---
How would this actually work? $RANDOM doesn't end up anywhere usable
other than the listening path on the remote side. Do you enumerate all
paths there to figure out which one?

I suspect $RANDOM isn't the best solution for your underlying problem.
For a start, some shells already provide this with syntax that is
incompatible with yours (e.g. https://man.openbsd.org/ksh.1#RANDOM).
Furthermore, a merely random input is only part of an effective
unique/temporary name facility.

Would an explicit unique/temporary name facility for forwarded Unix
domain sockets be better? There is already an analogous thing for
remote-forward ports, where a listener port number of 0 indicates that
the server should allocate one and tell the client what it picked. We
could do something similar here (say when passed an empty listen
pathname). Would this work for you?

--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.