Skip to content

Commit

Permalink
Fix spelling for log and help (#50860)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenGravy authored Jan 8, 2025
1 parent 26a0ac8 commit b90c1f6
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/auth/auth_with_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -2962,14 +2962,14 @@ func (a *ServerWithRoles) GetCurrentUserRoles(ctx context.Context) ([]types.Role
func (a *ServerWithRoles) desiredAccessInfo(ctx context.Context, req *proto.UserCertsRequest, user types.User) (*services.AccessInfo, error) {
if req.Username != a.context.User.GetName() {
if isRoleImpersonation(*req) {
a.authServer.logger.WarnContext(ctx, "User tried to issue a cert for another user wjile adding role requests",
a.authServer.logger.WarnContext(ctx, "User tried to issue a cert for another user while adding role requests",
"user", a.context.User.GetName(),
"requested_user", req.Username,
)
return nil, trace.AccessDenied("User %v tried to issue a cert for %v and added role requests. This is not supported.", a.context.User.GetName(), req.Username)
}
if len(req.AccessRequests) > 0 {
a.authServer.logger.WarnContext(ctx, "User tried to issue a cert for another user wihile adding access requests",
a.authServer.logger.WarnContext(ctx, "User tried to issue a cert for another user while adding access requests",
"user", a.context.User.GetName(),
"requested_user", req.Username,
)
Expand Down
2 changes: 1 addition & 1 deletion lib/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -1920,7 +1920,7 @@ func readCACert(database *Database) ([]byte, error) {
if database.CACertFile != "" {
if database.TLS.CACertFile != "" {
// New and old fields are set. Ignore the old field.
slog.WarnContext(context.Background(), "Ignoring deprecated ca_cert_file database in configuration; using tls.ca_cert_file", "dababase", database.Name)
slog.WarnContext(context.Background(), "Ignoring deprecated ca_cert_file database in configuration; using tls.ca_cert_file", "database", database.Name)
} else {
// Only old field is set, inform about deprecation.
slog.WarnContext(context.Background(), "ca_cert_file is deprecated, please use tls.ca_cert_file instead for databases", "database", database.Name)
Expand Down
2 changes: 1 addition & 1 deletion lib/events/athena/athena.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ func newAthenaMetrics(cfg athenaMetricsConfig) (*athenaMetrics, error) {
prometheus.HistogramOpts{
Namespace: teleport.MetricNamespace,
Name: teleport.MetricParquetlogConsumerDeleteEventsDuration,
Help: "Duration of delation of events on SQS in parquetlog",
Help: "Duration of deletion of events on SQS in parquetlog",
// lowest bucket start of upper bound 0.001 sec (1 ms) with factor 2
// highest bucket start of 0.001 sec * 2^15 == 32.768 sec
Buckets: prometheus.ExponentialBuckets(0.001, 2, 16),
Expand Down
4 changes: 2 additions & 2 deletions lib/reversetunnel/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (p *transport) start() {

p.logger.DebugContext(p.closeContext, "Received out-of-band proxy transport request",
"target_address", dreq.Address,
"taget_server_id", dreq.ServerID,
"target_server_id", dreq.ServerID,
"client_addr", dreq.ClientSrcAddr,
)

Expand Down Expand Up @@ -414,7 +414,7 @@ func (p *transport) getConn(addr string, r *sshutils.DialReq) (net.Conn, bool, e
}

errTun := err
p.logger.DebugContext(p.closeContext, "Attempting to dial server directly", "taget_addr", addr)
p.logger.DebugContext(p.closeContext, "Attempting to dial server directly", "target_addr", addr)
conn, err = p.directDial(addr)
if err != nil {
return nil, false, trace.ConnectionProblem(err, "failed dialing through tunnel (%v) or directly (%v)", errTun, err)
Expand Down
2 changes: 1 addition & 1 deletion lib/srv/db/cloud/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (m *Metadata) updateAWS(ctx context.Context, database types.Database, fetch
return trace.Wrap(err)
}

m.logger.DebugContext(ctx, "Fetched metadata for dabase", "database", database, "metadata", logutils.StringerAttr(fetchedMeta))
m.logger.DebugContext(ctx, "Fetched metadata for database", "database", database, "metadata", logutils.StringerAttr(fetchedMeta))
fetchedMeta.AssumeRoleARN = meta.AssumeRoleARN
fetchedMeta.ExternalID = meta.ExternalID
database.SetStatusAWS(*fetchedMeta)
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/host/hostusers.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func UserDel(username string) (exitCode int, err error) {
// userdel --remove (remove home) username
cmd := exec.Command(userdelBin, args...)
output, err := cmd.CombinedOutput()
slog.DebugContext(context.Background(), "usedel command completed",
slog.DebugContext(context.Background(), "userdel command completed",
"command_path", cmd.Path,
"output", string(output),
)
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/unpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func extractFile(tarball *tar.Reader, header *tar.Header, dir string, dirMode os
case tar.TypeSymlink:
return writeSymbolicLink(filepath.Join(dir, header.Name), header.Linkname, dirMode)
default:
slog.WarnContext(context.Background(), "Unsupported type flag for taball",
slog.WarnContext(context.Background(), "Unsupported type flag for tarball",
"type_flag", header.Typeflag,
"header", header.Name,
)
Expand Down

0 comments on commit b90c1f6

Please sign in to comment.