Skip to content

Commit

Permalink
Merge pull request cockroachdb#21346 from knz/20180109-log-uid-warn
Browse files Browse the repository at this point in the history
cli/start: log uid/gid details in the log file
  • Loading branch information
knz committed Jan 10, 2018
2 parents 534cc25 + 259b507 commit 8e731c6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/cli/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,13 @@ func reportConfiguration(ctx context.Context) {
if envVarsUsed := envutil.GetEnvVarsUsed(); len(envVarsUsed) > 0 {
log.Infof(ctx, "using local environment variables: %s", strings.Join(envVarsUsed, ", "))
}
// If a user ever reports "bad things have happened", any
// troubleshooting steps will want to rule out that the user was
// running as root in a multi-user environment, or using different
// uid/gid across runs in the same data directory. To determine
// this, it's easier if the information appears in the log file.
log.Infof(ctx, "process identity: uid %d euid %d gid %d egid %d",
syscall.Getuid(), syscall.Geteuid(), syscall.Getgid(), syscall.Getegid())
}

func maybeWarnMemorySizes(ctx context.Context) {
Expand Down

0 comments on commit 8e731c6

Please sign in to comment.