]> 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 8e6812fda2510fde84564ee7a45b31253e58bde8..cd94e03c045e5ee1c58cc836f9b5d481ce4e17f9 100644 (file)
@@ -33,7 +33,6 @@ void
 usage(void)
 {
        fprint(2, "usage: tlssrv [-D] -[aA] [-k keyspec]] [-c cert] [-l logfile] [-r remotesys] cmd [args...]\n");
-       fprint(2, "  after  auth/secretpem key.pem > /mnt/factotum/ctl\n");
        exits("usage");
 }
 
@@ -85,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;