mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
[CI:DOCS] "setup" -> "set up" in source code comments
* Replace "setup", "lookup" with "set up", "look up" when used as verbs. Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
This commit is contained in:
@ -71,7 +71,7 @@ func setupImageEngine(cmd *cobra.Command) (entities.ImageEngine, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// we also need to set up the container engine since this
|
// we also need to set up the container engine since this
|
||||||
// is required to setup the rootless namespace
|
// is required to set up the rootless namespace
|
||||||
if _, err = setupContainerEngine(cmd); err != nil {
|
if _, err = setupContainerEngine(cmd); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -194,7 +194,7 @@ type ContainerSecurityConfig struct {
|
|||||||
// If not explicitly set, an unused random MLS label will be assigned by
|
// If not explicitly set, an unused random MLS label will be assigned by
|
||||||
// containers/storage (but only if SELinux is enabled).
|
// containers/storage (but only if SELinux is enabled).
|
||||||
MountLabel string `json:"MountLabel,omitempty"`
|
MountLabel string `json:"MountLabel,omitempty"`
|
||||||
// LabelOpts are options passed in by the user to setup SELinux labels.
|
// LabelOpts are options passed in by the user to set up SELinux labels.
|
||||||
// These are used by the containers/storage library.
|
// These are used by the containers/storage library.
|
||||||
LabelOpts []string `json:"labelopts,omitempty"`
|
LabelOpts []string `json:"labelopts,omitempty"`
|
||||||
// User and group to use in the container. Can be specified as only user
|
// User and group to use in the container. Can be specified as only user
|
||||||
@ -386,7 +386,7 @@ type ContainerMiscConfig struct {
|
|||||||
IsService bool `json:"isService"`
|
IsService bool `json:"isService"`
|
||||||
// SdNotifyMode tells libpod what to do with a NOTIFY_SOCKET if passed
|
// SdNotifyMode tells libpod what to do with a NOTIFY_SOCKET if passed
|
||||||
SdNotifyMode string `json:"sdnotifyMode,omitempty"`
|
SdNotifyMode string `json:"sdnotifyMode,omitempty"`
|
||||||
// Systemd tells libpod to setup the container in systemd mode, a value of nil denotes false
|
// Systemd tells libpod to set up the container in systemd mode, a value of nil denotes false
|
||||||
Systemd *bool `json:"systemd,omitempty"`
|
Systemd *bool `json:"systemd,omitempty"`
|
||||||
// HealthCheckConfig has the health check command and related timings
|
// HealthCheckConfig has the health check command and related timings
|
||||||
HealthCheckConfig *manifest.Schema2HealthConfig `json:"healthcheck"`
|
HealthCheckConfig *manifest.Schema2HealthConfig `json:"healthcheck"`
|
||||||
|
@ -367,7 +367,7 @@ func (c *Container) getUserOverrides() *lookup.Overrides {
|
|||||||
|
|
||||||
func lookupHostUser(name string) (*runcuser.ExecUser, error) {
|
func lookupHostUser(name string) (*runcuser.ExecUser, error) {
|
||||||
var execUser runcuser.ExecUser
|
var execUser runcuser.ExecUser
|
||||||
// Lookup User on host
|
// Look up User on host
|
||||||
u, err := util.LookupUser(name)
|
u, err := util.LookupUser(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &execUser, err
|
return &execUser, err
|
||||||
@ -2600,13 +2600,13 @@ func (c *Container) generateCurrentUserGroupEntry() (string, int, error) {
|
|||||||
return "", 0, errors.Wrapf(err, "failed to get current group")
|
return "", 0, errors.Wrapf(err, "failed to get current group")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lookup group name to see if it exists in the image.
|
// Look up group name to see if it exists in the image.
|
||||||
_, err = lookup.GetGroup(c.state.Mountpoint, g.Name)
|
_, err = lookup.GetGroup(c.state.Mountpoint, g.Name)
|
||||||
if err != runcuser.ErrNoGroupEntries {
|
if err != runcuser.ErrNoGroupEntries {
|
||||||
return "", 0, err
|
return "", 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lookup GID to see if it exists in the image.
|
// Look up GID to see if it exists in the image.
|
||||||
_, err = lookup.GetGroup(c.state.Mountpoint, g.Gid)
|
_, err = lookup.GetGroup(c.state.Mountpoint, g.Gid)
|
||||||
if err != runcuser.ErrNoGroupEntries {
|
if err != runcuser.ErrNoGroupEntries {
|
||||||
return "", 0, err
|
return "", 0, err
|
||||||
@ -2676,7 +2676,7 @@ func (c *Container) generatePasswdEntry() (string, error) {
|
|||||||
|
|
||||||
addedUID := 0
|
addedUID := 0
|
||||||
for _, userid := range c.config.HostUsers {
|
for _, userid := range c.config.HostUsers {
|
||||||
// Lookup User on host
|
// Look up User on host
|
||||||
u, err := util.LookupUser(userid)
|
u, err := util.LookupUser(userid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
@ -2728,13 +2728,13 @@ func (c *Container) generateCurrentUserPasswdEntry() (string, int, int, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Container) userPasswdEntry(u *user.User) (string, error) {
|
func (c *Container) userPasswdEntry(u *user.User) (string, error) {
|
||||||
// Lookup the user to see if it exists in the container image.
|
// Look up the user to see if it exists in the container image.
|
||||||
_, err := lookup.GetUser(c.state.Mountpoint, u.Username)
|
_, err := lookup.GetUser(c.state.Mountpoint, u.Username)
|
||||||
if err != runcuser.ErrNoPasswdEntries {
|
if err != runcuser.ErrNoPasswdEntries {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lookup the UID to see if it exists in the container image.
|
// Look up the UID to see if it exists in the container image.
|
||||||
_, err = lookup.GetUser(c.state.Mountpoint, u.Uid)
|
_, err = lookup.GetUser(c.state.Mountpoint, u.Uid)
|
||||||
if err != runcuser.ErrNoPasswdEntries {
|
if err != runcuser.ErrNoPasswdEntries {
|
||||||
return "", err
|
return "", err
|
||||||
@ -2806,7 +2806,7 @@ func (c *Container) generateUserPasswdEntry(addedUID int) (string, error) {
|
|||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lookup the user to see if it exists in the container image
|
// Look up the user to see if it exists in the container image
|
||||||
_, err = lookup.GetUser(c.state.Mountpoint, userspec)
|
_, err = lookup.GetUser(c.state.Mountpoint, userspec)
|
||||||
if err != runcuser.ErrNoPasswdEntries {
|
if err != runcuser.ErrNoPasswdEntries {
|
||||||
return "", err
|
return "", err
|
||||||
|
@ -109,7 +109,7 @@ func (r *RootlessNetNS) getPath(path string) string {
|
|||||||
func (r *RootlessNetNS) Do(toRun func() error) error {
|
func (r *RootlessNetNS) Do(toRun func() error) error {
|
||||||
err := r.ns.Do(func(_ ns.NetNS) error {
|
err := r.ns.Do(func(_ ns.NetNS) error {
|
||||||
// Before we can run the given function,
|
// Before we can run the given function,
|
||||||
// we have to setup all mounts correctly.
|
// we have to set up all mounts correctly.
|
||||||
|
|
||||||
// The order of the mounts is IMPORTANT.
|
// The order of the mounts is IMPORTANT.
|
||||||
// The idea of the extra mount ns is to make /run and /var/lib/cni writeable
|
// The idea of the extra mount ns is to make /run and /var/lib/cni writeable
|
||||||
@ -419,7 +419,7 @@ func (r *Runtime) GetRootlessNetNs(new bool) (*RootlessNetNS, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "error creating rootless network namespace")
|
return nil, errors.Wrap(err, "error creating rootless network namespace")
|
||||||
}
|
}
|
||||||
// setup slirp4netns here
|
// set up slirp4netns here
|
||||||
path := r.config.Engine.NetworkCmdPath
|
path := r.config.Engine.NetworkCmdPath
|
||||||
if path == "" {
|
if path == "" {
|
||||||
var err error
|
var err error
|
||||||
@ -656,9 +656,9 @@ func (r *Runtime) configureNetNS(ctr *Container, ctrNS ns.NetNS) (status map[str
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// setup rootless port forwarder when rootless with ports and the network status is empty,
|
// set up rootless port forwarder when rootless with ports and the network status is empty,
|
||||||
// if this is called from network reload the network status will not be empty and we should
|
// if this is called from network reload the network status will not be empty and we should
|
||||||
// not setup port because they are still active
|
// not set up port because they are still active
|
||||||
if rootless.IsRootless() && len(ctr.config.PortMappings) > 0 && ctr.getNetworkStatus() == nil {
|
if rootless.IsRootless() && len(ctr.config.PortMappings) > 0 && ctr.getNetworkStatus() == nil {
|
||||||
// set up port forwarder for rootless netns
|
// set up port forwarder for rootless netns
|
||||||
netnsPath := ctrNS.Path()
|
netnsPath := ctrNS.Path()
|
||||||
|
Reference in New Issue
Block a user