Skip to content

Commit

Permalink
issue 2117: fix another lint
Browse files Browse the repository at this point in the history
Signed-off-by: Linh Luong <bo17age@gmail.com>
  • Loading branch information
bo17age committed May 30, 2024
1 parent f48b714 commit a9b5a89
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/osutil/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ var (
// regexUsername matches user and group names to be valid for `useradd`.
// `useradd` allows names with a trailing '$', but it feels prudent to map those
// names to the fallback user as well, so the regex does not allow them.
var regexUsername = regexp.MustCompile("^[a-z_][a-z0-9_-]*$")
var notAllowedUsernameRegex = regexp.MustCompile(`^admin$`)
var (
regexUsername = regexp.MustCompile("^[a-z_][a-z0-9_-]*$")
notAllowedUsernameRegex = regexp.MustCompile(`^admin$`)
)

// regexPath detects valid Linux path.
var regexPath = regexp.MustCompile("^[/a-zA-Z0-9_-]+$")
Expand Down

0 comments on commit a9b5a89

Please sign in to comment.