News for hackers. Stuff that matters.
Re:Plan 9 Desktop Guide by lizknope on Wednesday October 06, 2021 @01:36PM (#28775883)
https://en.wikipedia.org/wiki/Everything_is_a_file

Why is the socket interface the way it is? Why isn't it like /dev/tcp in bash?

I tried Plan 9 about 10 years ago. Since then I use VPNs everyday and it can be tricky to setup at times.

The Plan 9 concept of just importing /net from the VPN machine as a union overlay is so elegant.

https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs#Combinin...

Re:Plan 9 Desktop Guide by anthk on Wednesday October 06, 2021 @03:30PM (#28777254)
>Why is the socket interface the way it is? Why isn't it like /dev/tcp in bash?

That's wrong. /dev/tcp or /dev/udp should be devices themselves, not a fake one for bash.

Re:Plan 9 Desktop Guide by lizknope on Wednesday October 06, 2021 @06:17PM (#28779182)
I know the one in bash is fake but I'm saying that /dev/tcp and /dev/udp could be filesystems like /dev or /proc

Open /dev/tcp/google.com/80 or /dev/tcp/192.168.1.1/22 or whatever.

Instead of having your web server start as root and then do some UID switching to drop priveleges why not have it start as a non priveleged user from the beginning?

The ports under 1024 are reserved for root but how about we get rid of that and have files for every port number? Then use chown and chmod to set permissions and only let the httpd user account read and write to port 80?

Re:Plan 9 Desktop Guide by anthk on Wednesday October 06, 2021 @07:58PM (#28780009)
Plan9 doesn't work like that, you have a /net equivalent per namespace.

https://doc.cat-v.org/plan_9/4th_edition/papers/names