diff --git a/sbin/ngcp-sync-grants b/sbin/ngcp-sync-grants index 1ba12c1a..5ddbbcdc 100755 --- a/sbin/ngcp-sync-grants +++ b/sbin/ngcp-sync-grants @@ -348,7 +348,7 @@ sub grants_helper { my $host = $TEMP_GRANT_HOST; set_user_protected_password($user, $host); - $dbh->do("REVOKE ALL PRIVILEGES, GRANT OPTION FROM $user\@$host"); + $dbh->do("REVOKE ALL PRIVILEGES, GRANT OPTION FROM '$user'\@'$host'"); foreach my $grant (@$grants) { $grant = normalise_grant_str($grant); @@ -365,7 +365,7 @@ sub grants_helper { } my $temp_grants = $dbh->selectall_arrayref( - "SHOW GRANTS FOR ?\@?", undef, $user, $host); + "SHOW GRANTS FOR '$user'\@'$host'"); for (my $i=0;$i<=$#$temp_grants;$i++) { if ($temp_grants->[$i][0] =~ /grant usage/i) { @@ -421,7 +421,7 @@ sub check_grants { my ($grants, $user, $host) = @_; my $current_grants = $dbh->selectall_arrayref( - "SHOW GRANTS FOR ?\@?", undef, $user, $host); + "SHOW GRANTS FOR '$user'\@'$host'"); if ($DBI::errstr && ($DBI::errstr !~ /There is no such grant defined/ && $DBI::errstr !~ /fetch[()]+ without execute[()]+/)) {