ipn/ipnserver: grant client r/w access if peer uid matches tailscaled
"os/signal"
"os/user"
"runtime"
+ "strconv"
"strings"
"sync"
"sync/atomic"
@@ -336,6 +337,10 @@ func isReadonlyConn(c net.Conn, logf logger.Logf) bool {
logf("connection from userid %v; root has access", uid)
return rw
}
+ if selfUID := os.Getuid(); selfUID != 0 && uid == strconv.Itoa(selfUID) {
+ logf("connection from userid %v; connection from non-root user matching daemon has access", uid)
+ return rw
+ }
var adminGroupID string
switch runtime.GOOS {
case "darwin":
