소스 검색

Merge pull request #6138 from NERSC/6092-setuidrace

Fix for setuid race condition in LXC driver
Victor Vieux 11 년 전
부모
커밋
55230b3332
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      daemon/execdriver/lxc/driver.go

+ 2 - 0
daemon/execdriver/lxc/driver.go

@@ -9,6 +9,7 @@ import (
 	"os/exec"
 	"path"
 	"path/filepath"
+	"runtime"
 	"strconv"
 	"strings"
 	"syscall"
@@ -26,6 +27,7 @@ const DriverName = "lxc"
 
 func init() {
 	execdriver.RegisterInitFunc(DriverName, func(args *execdriver.InitArgs) error {
+		runtime.LockOSThread()
 		if err := setupEnv(args); err != nil {
 			return err
 		}