code: plan9front

Download patch

ref: a84ffa1accef6e4900a7ff3462e9448574b2fb0a
parent: 8b5714139bb0d965eb626f87115964d8dcad04af
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Oct 31 11:43:00 EDT 2022

lib9p: double the buffer for /srv/$service

Use a buffer bigger than the name limit of devsrv
(127 characters), as this will produce the correct
error message when trying to create the srv file
instead of silently truncating the buffer before.

--- a/sys/src/lib9p/post.c
+++ b/sys/src/lib9p/post.c
@@ -20,7 +20,7 @@
 	if(pipe(fd) < 0)
 		return -1;
 	if(name != nil){
-		char buf[80];
+		char buf[160];
 
 		snprint(buf, sizeof buf, "/srv/%s", name);
 		if((cfd = create(buf, OWRITE|ORCLOSE|OCEXEC, 0600)) < 0