[Devel] [ openser-Bugs-1380823 ] openser_mysql.sh requires root password

SourceForge.net noreply at sourceforge.net
Thu Dec 15 20:54:23 CET 2005


Bugs item #1380823, was opened at 2005-12-14 23:06
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1380823&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: tools
Group: ver devel
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Norman Brandinger (goestelecom)
>Assigned to: Bogdan (bogdan_iancu)
Summary: openser_mysql.sh requires root password

Initial Comment:
openser_mysql.sh requires the user to physically enter
a MySQL root password regardless of the setting of the
exported PW variable in the code below:

export PW
if [ "$#" -ne 0 ]; then
  prompt_pw
fi

The "$#" value is the number of parameters passed to
openser_mysql.sh and has nothing to do with the success
or failure of the previous "export PW" statement.

I suggest replacing the conditional with

if [ $PW = "" ]; then

The above fix will bypass the password prompt if the
variable PW is set to a non null value.

This error makes it impossible to successfully issue
the command:

openser_mysql.sh backup > todays.backup


Additional Comments:

A review of openser_mysql.sh shows that MySQL root
permissions are used for most operations, even those
that do not require such high permissions.

The backup command really only requires read-only (and
on my system table_lock) permissions.

A review of this script probably should be placed on
the "roadmap".

Regards,
Norm

----------------------------------------------------------------------

>Comment By: Bogdan (bogdan_iancu)
Date: 2005-12-15 21:54

Message:
Logged In: YES 
user_id=1275325

thanks for the comments - they will find their way in a
larger review of the DB scripts.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1380823&group_id=139143



More information about the Devel mailing list