浏览代码

pkg/transport: remove dependency on pkg/fileutils

4a0f922 changed SelfCert to use a helper from pkg/fileutils which
introduced a transitive dependency on coreos/pkg/capnslog. This means
anyone who imports pkg/transport to use TLS with the clientv3 library
has the default stdlib logger hijacked by capnslog.

This PR reverts 4a0f922. There are no tests because 4a0f922 contained no
test and was not attached to a PR.

Fixes #7350
David Cheney 8 年之前
父节点
当前提交
9b84127739
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      pkg/transport/listener.go

+ 1 - 2
pkg/transport/listener.go

@@ -30,7 +30,6 @@ import (
 	"strings"
 	"time"
 
-	"github.com/coreos/etcd/pkg/fileutil"
 	"github.com/coreos/etcd/pkg/tlsutil"
 )
 
@@ -86,7 +85,7 @@ func (info TLSInfo) Empty() bool {
 }
 
 func SelfCert(dirpath string, hosts []string) (info TLSInfo, err error) {
-	if err = fileutil.TouchDirAll(dirpath); err != nil {
+	if err = os.MkdirAll(dirpath, 0700); err != nil {
 		return
 	}