ctr: Remove getTempDir
It is unused since 4c1af8fdd8
("Port ctr to use client") and leaving it
around will just tempt people into writing code with security holes.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
parent
4576979244
commit
e9559c6eed
@ -4,10 +4,8 @@ import (
|
||||
gocontext "context"
|
||||
"encoding/csv"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
@ -131,18 +129,6 @@ func getVersionService(context *cli.Context) (versionservice.VersionClient, erro
|
||||
return versionservice.NewVersionClient(conn), nil
|
||||
}
|
||||
|
||||
func getTempDir(id string) (string, error) {
|
||||
err := os.MkdirAll(filepath.Join(os.TempDir(), "ctr"), 0700)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
tmpDir, err := ioutil.TempDir(filepath.Join(os.TempDir(), "ctr"), fmt.Sprintf("%s-", id))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return tmpDir, nil
|
||||
}
|
||||
|
||||
func waitContainer(events execution.Tasks_EventsClient, id string, pid uint32) (uint32, error) {
|
||||
for {
|
||||
e, err := events.Recv()
|
||||
|
Loading…
Reference in New Issue
Block a user