Skip to content

Commit

Permalink
Add xtrabackup created files to exemptions
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Jan 30, 2025
1 parent 53c5ea0 commit 6386ad1
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions go/test/endtoend/cluster/vttablet_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -723,18 +723,22 @@ func (vttablet *VttabletProcess) ConfirmDataDirHasNoGlobalPerms(t *testing.T) {
return
}

// These are intentionally created with the world/other read bit set by mysqld itself
// during the --initialize[-insecure] step.
// See: https://dev.mysql.com/doc/mysql-security-excerpt/en/creating-ssl-rsa-files-using-mysql.html
// "On Unix and Unix-like systems, the file access mode is 644 for certificate files
// (that is, world readable) and 600 for key files (that is, accessible only by the
// account that runs the server)."
var allowedFiles = []string{
// These are intentionally created with the world/other read bit set by mysqld itself
// during the --initialize[-insecure] step.
// See: https://dev.mysql.com/doc/mysql-security-excerpt/en/creating-ssl-rsa-files-using-mysql.html
// "On Unix and Unix-like systems, the file access mode is 644 for certificate files
// (that is, world readable) and 600 for key files (that is, accessible only by the
// account that runs the server)."
path.Join("data", "ca.pem"),
path.Join("data", "client-cert.pem"),
path.Join("data", "public_key.pem"),
path.Join("data", "server-cert.pem"),
"mysql.sock", // Must have global perms for anyone to use it
// The domain socket must have global perms for anyone to use it.
"mysql.sock",
// These files are created by xtrabackup.
path.Join("tmp", "xtrabackup_checkpoints"),
path.Join("tmp", "xtrabackup_info"),
}

var matches []string
Expand Down

0 comments on commit 6386ad1

Please sign in to comment.