diff --git a/src/utilities/gsec/security.epp b/src/utilities/gsec/security.epp index 37f192fb51..78b448333c 100644 --- a/src/utilities/gsec/security.epp +++ b/src/utilities/gsec/security.epp @@ -52,9 +52,9 @@ static bool grantRevokeAdmin(ISC_STATUS* isc_status, FB_API_HANDLE DB, FB_API_HA Firebird::string sql; - sql.printf(io_user_data->admin ? "GRANT %s TO %s" : "REVOKE %s FROM %s", + sql.printf(io_user_data->admin ? "GRANT %s TO \"%s\"" : "REVOKE %s FROM \"%s\"", "RDB$ADMIN", io_user_data->user_name); - isc_dsql_execute_immediate(isc_status, &DB, &trans, sql.length(), sql.c_str(), 1, NULL); + isc_dsql_execute_immediate(isc_status, &DB, &trans, sql.length(), sql.c_str(), SQL_DIALECT_V6, NULL); if (isc_status[1] && io_user_data->admin == 0) { @@ -63,7 +63,7 @@ static bool grantRevokeAdmin(ISC_STATUS* isc_status, FB_API_HANDLE DB, FB_API_HA WITH R.RDB$USER EQ io_user_data->user_name AND R.RDB$RELATION_NAME EQ 'RDB$ADMIN' AND R.RDB$PRIVILEGE EQ 'M' - sql.printf("REVOKE RDB$ADMIN FROM %s GRANTED BY %s", + sql.printf("REVOKE RDB$ADMIN FROM \"%s\" GRANTED BY \"%s\"", io_user_data->user_name, R.RDB$GRANTOR); END_FOR if (request) @@ -74,7 +74,7 @@ static bool grantRevokeAdmin(ISC_STATUS* isc_status, FB_API_HANDLE DB, FB_API_HA return false; } } - isc_dsql_execute_immediate(isc_status, &DB, &trans, sql.length(), sql.c_str(), 1, NULL); + isc_dsql_execute_immediate(isc_status, &DB, &trans, sql.length(), sql.c_str(), SQL_DIALECT_V6, NULL); } return isc_status[1] == 0;