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

Modify build_unicorn_support.sh to not require root for most build steps #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rbdixon
Copy link

@rbdixon rbdixon commented Jan 20, 2018

Quick swipe to try to help out with #4.

Now uses a git submodule, rather than wget, to download and verify unicorn
integrity. Root is not required for building. sudo is used to install unicorn
binaries.

Thanks for the talk at Shmoocon.

echo "================================================="
echo "Unicorn-AFL build script"
echo "================================================="
echo

echo "[*] Performing basic sanity checks..."

if [ "$(id -u)" != "0" ]; then
if [ "$(id -u)" = "0" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we specifically preclude users from installing as root here? Would it be better to just remove this check completely?

Copy link
Author

Choose a reason for hiding this comment

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

I can do that, works for me.

Copy link
Collaborator

@njv299 njv299 left a comment

Choose a reason for hiding this comment

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

Awesome changes! I actually think we can remove the 'sudo' check altogether now, but I want to get your feedback on it.

Thanks for the help!

…eps.

Now uses a git submodule, rather than wget, to download and verify unicorn
integrity. Root is not required for building. sudo is used to install unicorn
binaries.
@rbdixon
Copy link
Author

rbdixon commented Jan 22, 2018

Updated to remove the sudo check as discussed.

Copy link
Collaborator

@njv299 njv299 left a comment

Choose a reason for hiding this comment

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

Testing this works great up until the call to make and install the Python bindings (via 'python setup.py install'). If the build script is run without sudo it fails at this point (on my test system, a stock ubuntu 16.04 box). I think this could be remedied in a couple ways, including adding 'sudo' when making the bindings or re-thinking the whole bindings build process (pip? virtualenv? This seems unnecessary to me).

For now my vote would be to just add 'sudo' to the python bindings install, then adjust the unicorn_mode readme to say that the install script should be run with sudo.

I'm definitely open to suggestions, though!

@rbdixon
Copy link
Author

rbdixon commented Jan 25, 2018

I'll take another crack at this next week.

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

Successfully merging this pull request may close these issues.

2 participants