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");
}
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;