aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/main_remote.go
blob: 2a7d184cddb6b146cefe6d5a0b4911fd83251d32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// +build remoteclient

package main

import (
	"os"

	"github.com/containers/libpod/pkg/rootless"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
)

const remote = true

func init() {
	//	remote client specific flags can go here.
}

func setSyslog() error {
	return nil
}

func profileOn(cmd *cobra.Command) error {
	return nil
}

func profileOff(cmd *cobra.Command) error {
	return nil
}

func setupRootless(cmd *cobra.Command, args []string) error {
	if rootless.IsRootless() {
		became, ret, err := rootless.BecomeRootInUserNS()
		if err != nil {
			logrus.Errorf(err.Error())
			os.Exit(1)
		}
		if became {
			os.Exit(ret)
		}
	}
	return nil
}