Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aviau
Copy link
Member

@aviau aviau commented Jan 10, 2021

picked-up a small todo in the code.

@googlebot googlebot added the cla: yes Author has submitted the Google CLA. label Jan 10, 2021
@aviau aviau force-pushed the aviau/check-perms branch from c1c5fe4 to 69f8ed1 Compare January 10, 2021 22:02
// TODO: check that keyFile's unix permissions aren't too permissive.
if fileInfo, err := os.Stat(keyFile); err != nil {
return nil, fmt.Errorf("Checking for key file permissions %v: %v", keyFile, err)
} else if fileInfo.Mode().Perm() != 0600 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be too specific for Windows. You probably want Perm() & 0077 != 0 instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, done!

}

// Using key file
tmpKeyFile, _ := ioutil.TempFile(os.TempDir(), "camlitest")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use t.TempDir() instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done!

@aviau aviau force-pushed the aviau/check-perms branch from 69f8ed1 to 64692cc Compare January 11, 2021 23:48
@aviau
Copy link
Member Author

aviau commented Jan 12, 2021

ping @bradfitz I still can't merge anything.

Looks like I can manage issues but not push to protected branches. This is probably setup in repository permissions.

Can you also add me to the org?

Thanks

@aviau aviau requested a review from bradfitz January 13, 2021 18:41
@aviau aviau mentioned this pull request Jan 14, 2021
@bradfitz
Copy link
Contributor

ping @bradfitz I still can't merge anything.

Ah, indeed, we all the permissions set up all fancy here. I'd forgotten about that. All fixed. Try again?

@aviau
Copy link
Member Author

aviau commented Jan 14, 2021

Works, thanks :)

@aviau aviau force-pushed the aviau/check-perms branch from 64692cc to 97e1bd5 Compare January 14, 2021 14:06
@aviau aviau merged commit b2983ca into perkeep:master Jan 14, 2021
@aviau aviau deleted the aviau/check-perms branch January 14, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Author has submitted the Google CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants