Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common/custom tools clone stanzas - should not rm -rf arbitrarily, should instead set 700 on root folder #8

Open
arubdesu opened this issue May 18, 2014 · 1 comment

Comments

@arubdesu
Copy link
Contributor

-p'ing the mkdir means it sets 0777 on all intermediate folders, which may be all well and good in single-user systems with good security hardening practices already in place, but it should be addressed by instead creating the ~/src directory first with 700 if not present, with a chmod +a everyone deny delete" ~/src for good measure.
If you'd like I can whip up a branch/PR for this as well, but it's also weird when the boot script creates the folders(which it seems assumes the short username == github name? I don't understand the CS_REMOTE=${1:-github.com/osxc/xc-custom}) it essentially runs a 'clean' on both the common and custom folders by rm -rf'ing after creation. We know mkdir -p will not error if it sees directories are already there, so this would be uncaught with the current code and could cause data loss. If you want to add an optional 'clean' function and variable that's off by default but around for troubleshooting, it may make more sense.

@rricard
Copy link
Contributor

rricard commented Jun 2, 2014

Yes indeed I'm interested in a PR !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants