Skip to content

Commit

Permalink
Merge pull request #75 from jubalh/sp
Browse files Browse the repository at this point in the history
Correct spelling capabilties -> capabilities
  • Loading branch information
vrothberg authored Nov 30, 2020
2 parents 1082112 + b5e0aa6 commit c97374b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion internal/capabilities/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

// Package capabilities provides a mapping from common kernel bit masks to the
// alphanumerical represenation of kernel capabilities. See capabilities(7)
// alphanumerical representation of kernel capabilities. See capabilities(7)
// for additional information.
package capabilities

Expand Down
2 changes: 1 addition & 1 deletion internal/proc/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/pkg/errors"
)

// Status is a direct translation of a `/proc/[pid]/status`, wich provides much
// Status is a direct translation of a `/proc/[pid]/status`, which provides much
// of the information in /proc/[pid]/stat and /proc/[pid]/statm in a format
// that's easier for humans to parse.
type Status struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ type Process struct {
Pid string
// Stat contains data from /proc/$pid/stat.
Stat proc.Stat
// Status containes data from /proc/$pid/status.
// Status contains data from /proc/$pid/status.
Status proc.Status
// CmdLine containes data from /proc/$pid/cmdline.
// CmdLine contains data from /proc/$pid/cmdline.
CmdLine []string
// Label containers data from /proc/$pid/attr/current.
Label string
Expand Down
24 changes: 12 additions & 12 deletions psgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ func JoinNamespaceAndProcessInfoByPidsWithOptions(pids []string, descriptors []s
// catch race conditions
continue
}
return nil, errors.Wrapf(err, "error extracing PID namespace")
return nil, errors.Wrapf(err, "error extracting PID namespace")
}
if _, exists := nsMap[ns]; !exists {
nsMap[ns] = true
Expand Down Expand Up @@ -759,7 +759,7 @@ func processVSZ(p *process.Process, ctx *psContext) (string, error) {
}

// parseCAP parses cap (a string bit mask) and returns the associated set of
// capabilities. If all capabilties are set, "full" is returned. If no
// capabilities. If all capabilities are set, "full" is returned. If no
// capability is enabled, "none" is returned.
func parseCAP(cap string) (string, error) {
mask, err := strconv.ParseUint(cap, 16, 64)
Expand All @@ -777,36 +777,36 @@ func parseCAP(cap string) (string, error) {
return strings.Join(caps, ","), nil
}

// processCAPAMB returns the set of ambient capabilties associated with
// process p. If all capabilties are set, "full" is returned. If no
// processCAPAMB returns the set of ambient capabilities associated with
// process p. If all capabilities are set, "full" is returned. If no
// capability is enabled, "none" is returned.
func processCAPAMB(p *process.Process, ctx *psContext) (string, error) {
return parseCAP(p.Status.CapAmb)
}

// processCAPINH returns the set of inheritable capabilties associated with
// process p. If all capabilties are set, "full" is returned. If no
// processCAPINH returns the set of inheritable capabilities associated with
// process p. If all capabilities are set, "full" is returned. If no
// capability is enabled, "none" is returned.
func processCAPINH(p *process.Process, ctx *psContext) (string, error) {
return parseCAP(p.Status.CapInh)
}

// processCAPPRM returns the set of permitted capabilties associated with
// process p. If all capabilties are set, "full" is returned. If no
// processCAPPRM returns the set of permitted capabilities associated with
// process p. If all capabilities are set, "full" is returned. If no
// capability is enabled, "none" is returned.
func processCAPPRM(p *process.Process, ctx *psContext) (string, error) {
return parseCAP(p.Status.CapPrm)
}

// processCAPEFF returns the set of effective capabilties associated with
// process p. If all capabilties are set, "full" is returned. If no
// processCAPEFF returns the set of effective capabilities associated with
// process p. If all capabilities are set, "full" is returned. If no
// capability is enabled, "none" is returned.
func processCAPEFF(p *process.Process, ctx *psContext) (string, error) {
return parseCAP(p.Status.CapEff)
}

// processCAPBND returns the set of bounding capabilties associated with
// process p. If all capabilties are set, "full" is returned. If no
// processCAPBND returns the set of bounding capabilities associated with
// process p. If all capabilities are set, "full" is returned. If no
// capability is enabled, "none" is returned.
func processCAPBND(p *process.Process, ctx *psContext) (string, error) {
return parseCAP(p.Status.CapBnd)
Expand Down

0 comments on commit c97374b

Please sign in to comment.