]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/cmd/tlssrv.c
cc, ?[acl]: fix gethunk() and move common memory allocator code to cc/compat
[plan9front.git] / sys / src / cmd / tlssrv.c
index 274b5c6c592206f2e4ff364e85130e3c85ddf95d..cd94e03c045e5ee1c58cc836f9b5d481ce4e17f9 100644 (file)
@@ -84,9 +84,18 @@ main(int argc, char *argv[])
                if(ai == nil)
                        sysfatal("auth_proxy: %r");
 
-               if(auth == 1)
-               if(auth_chuid(ai, nil) < 0)
-                       sysfatal("auth_chuid: %r");
+               if(auth == 1){
+                       Dir nd;
+
+                       if(auth_chuid(ai, nil) < 0)
+                               sysfatal("auth_chuid: %r");
+
+                       /* chown network connection */
+                       nulldir(&nd);
+                       nd.mode = 0660;
+                       nd.uid = ai->cuid;
+                       dirfwstat(0, &nd);
+               }
 
                conn->pskID = "p9secret";
                conn->psk = ai->secret;