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

Have main processes run as non-priveledged user #21

Closed
gaenserich opened this issue Apr 24, 2015 · 12 comments
Closed

Have main processes run as non-priveledged user #21

gaenserich opened this issue Apr 24, 2015 · 12 comments
Milestone

Comments

@gaenserich
Copy link
Owner

Instead of having all of hostsblock run as root, have only the needed processes do so, e.g.

  • sending signals to any dnscachers to restart
  • write to files under /etc

Will sudo work for these other situations, or is there another method?

@gaenserich gaenserich added this to the 1.1 milestone Apr 24, 2015
@pickfire
Copy link
Collaborator

I think sudo is the best method. Using su at one point of the code is nice too, just to let the users know that they are changing something that is important.

@pickfire pickfire self-assigned this Feb 24, 2016
@pickfire
Copy link
Collaborator

I will work on this in the future branch, what I will do in order (probably):

  • Becoming root is optional
  • dnsmasq configuration is changed optionally
  • Simplify the code into a single script
  • Use a simple Makefile instead of a script
  • Make it available for different distros
  • Write the manual pages

@Sadi58
Copy link
Collaborator

Sadi58 commented Feb 24, 2016

Sounds great!
Maybe when simplifying the code into a single script you could also address the issue I've raised about checking the online sources for any changes first, and then going ahead with updating those with changes (e.g. 2 separate functions)

@pickfire
Copy link
Collaborator

@Sadi58 I will, just leave it to me, the code is a bit long too, need to shorten it a bit.

@pickfire
Copy link
Collaborator

@gaenserich When I am reading the code, I found all those debugging info very annoying, by the way, can I just remove those extra useless code? It is a lot easier to debug with set -x.

And I will remove those lines which aren't really needed so hostsblock can be really runned as a script.
But I will work on this in the future branch.

@gaenserich
Copy link
Owner Author

gaenserich commented Feb 29, 2016 via email

@pickfire
Copy link
Collaborator

Yeah, I mean to use only one script for everything with the support of running uninteractively (cronjob-friendly).

@gaenserich
Copy link
Owner Author

gaenserich commented Feb 29, 2016 via email

@pickfire
Copy link
Collaborator

Yeah, I would like to include hostsblock-urlcheck in the main script too.

1 similar comment
@pickfire
Copy link
Collaborator

Yeah, I would like to include hostsblock-urlcheck in the main script too.

@pickfire pickfire removed their assignment Jul 1, 2016
@Wabuo
Copy link

Wabuo commented Jul 28, 2016

Let's look how the guys behind Yaourt did it maybe we can Learn something.

@gaenserich
Copy link
Owner Author

Fixed. Now uses user "hostsblock", and possible to (in the future) secure it down further using chroot.
a28f19c

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

No branches or pull requests

4 participants