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

PostgreSQL Fix in db_setup.sh restarts postgresql daemon in any case #668

Closed
DePierre opened this issue Apr 20, 2016 · 0 comments
Closed

Comments

@DePierre
Copy link
Contributor

The fix for postgresql SSL configuration in the file db_setup.sh restarts the daemon even in the case when the user said "no" to the fix:

$ ./scripts/db_setup.sh init 

------------------------- OWTF Database Helper Script -------------------------
                    Helps in creation of user and database                     
-------------------------------------------------------------------------------

[+] Ensure that you have required values in /root/.owtf/db.cfg

Press Enter to continue
n
CREATE ROLE
CREATE DATABASE
Having SSL=true in postgres config causes many errors (psycopg2 problem)
Remove SSL=true from the PostgreSQL config?[Y/n]n
Restarting the postgresql service

https://github.com/owtf/owtf/blob/develop/scripts/db_setup.sh#L33 does not check the user input before restarting the daemon.

I would expect the script to do nothing if I answer "no", especially since restarting the daemon takes quite some time.

DoomTaper pushed a commit to DoomTaper/owtf that referenced this issue Apr 21, 2016
@viyatb viyatb closed this as completed in 522f64b Apr 21, 2016
@DoomTaper DoomTaper mentioned this issue Apr 21, 2016
4 tasks
DePierre pushed a commit to DePierre/owtf that referenced this issue Apr 21, 2016
- Now postgres service will restart only if user inputs "y"
- The fix uses `SHOW config_file;` to get the path for the
  postgres config file
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

1 participant