mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 04:43:03 +01:00
Constant for non-specified role.
This commit is contained in:
parent
7ee9473fa4
commit
5d7fe7b9a1
@ -62,6 +62,7 @@ const size_t MAX_SQL_IDENTIFIER_SIZE = 32;
|
||||
const size_t MAX_SQL_IDENTIFIER_LEN = 31;
|
||||
typedef TEXT SqlIdentifier[MAX_SQL_IDENTIFIER_SIZE];
|
||||
|
||||
const char* const NULL_ROLE = "NONE";
|
||||
|
||||
const char* const PRIMARY_KEY = "PRIMARY KEY";
|
||||
const char* const FOREIGN_KEY = "FOREIGN KEY";
|
||||
|
@ -904,7 +904,7 @@ static void grant( Global* gbl, const UCHAR** ptr)
|
||||
/* This test may become obsolete as we now allow explicit ROLE keyword. */
|
||||
if (DYN_is_it_sql_role(gbl, user, dummy_name, tdbb)) {
|
||||
user_type = obj_sql_role;
|
||||
if (!strcmp(user, "NONE")) {
|
||||
if (!strcmp(user, NULL_ROLE)) {
|
||||
DYN_error_punt(false, 195, user, NULL, NULL, NULL, NULL);
|
||||
/* msg 195: keyword NONE could not be used as SQL role name. */
|
||||
}
|
||||
@ -935,7 +935,7 @@ static void grant( Global* gbl, const UCHAR** ptr)
|
||||
DYN_error_punt(false, 188, user, NULL, NULL, NULL, NULL);
|
||||
/* msg 188: Role doesn't exist. */
|
||||
}
|
||||
if (!strcmp(user, "NONE")) {
|
||||
if (!strcmp(user, NULL_ROLE)) {
|
||||
DYN_error_punt(false, 195, user, NULL, NULL, NULL, NULL);
|
||||
/* msg 195: keyword NONE could not be used as SQL role name. */
|
||||
}
|
||||
@ -950,7 +950,7 @@ static void grant( Global* gbl, const UCHAR** ptr)
|
||||
GET_STRING(ptr, object);
|
||||
grant_role_stmt = true;
|
||||
fb_utils::exact_name_limit(object, sizeof(object));
|
||||
if (!strcmp (object, "NONE")) {
|
||||
if (!strcmp (object, NULL_ROLE)) {
|
||||
DYN_error_punt(false, 195, object, NULL, NULL, NULL, NULL);
|
||||
/* msg 195: keyword NONE could not be used as SQL role name. */
|
||||
}
|
||||
@ -1630,7 +1630,7 @@ static void revoke_permission(Global* gbl, const UCHAR** ptr)
|
||||
/* This test may become obsolete as we now allow explicit ROLE keyword. */
|
||||
if (DYN_is_it_sql_role(gbl, user, dummy_name, tdbb)) {
|
||||
user_type = obj_sql_role;
|
||||
if (!strcmp(user, "NONE")) {
|
||||
if (!strcmp(user, NULL_ROLE)) {
|
||||
DYN_error_punt(false, 195, user, NULL, NULL, NULL, NULL);
|
||||
/* msg 195: keyword NONE could not be used as SQL role name. */
|
||||
}
|
||||
@ -1660,7 +1660,7 @@ static void revoke_permission(Global* gbl, const UCHAR** ptr)
|
||||
DYN_error_punt(false, 188, user, NULL, NULL, NULL, NULL);
|
||||
/* msg 188: Role doesn't exist. */
|
||||
}
|
||||
if (!strcmp(user, "NONE")) {
|
||||
if (!strcmp(user, NULL_ROLE)) {
|
||||
DYN_error_punt(false, 195, user, NULL, NULL, NULL, NULL);
|
||||
/* msg 195: keyword NONE could not be used as SQL role name. */
|
||||
}
|
||||
@ -1675,7 +1675,7 @@ static void revoke_permission(Global* gbl, const UCHAR** ptr)
|
||||
GET_STRING(ptr, object);
|
||||
fb_utils::exact_name_limit(object, sizeof(object));
|
||||
/* CVC: Make this a warning in the future.
|
||||
if (!strcmp(object, "NONE"))
|
||||
if (!strcmp(object, NULL_ROLE))
|
||||
DYN_error_punt(false, 195, object, NULL, NULL, NULL, NULL);
|
||||
*/
|
||||
/* msg 195: keyword NONE could not be used as SQL role name. */
|
||||
|
@ -3289,7 +3289,7 @@ void DYN_define_role( Global* gbl, const UCHAR** ptr)
|
||||
ERR_punt();
|
||||
}
|
||||
|
||||
if (strcmp(role_name, "NONE") == 0) {
|
||||
if (strcmp(role_name, NULL_ROLE) == 0) {
|
||||
/************************************************
|
||||
**
|
||||
** keyword NONE could not be used as SQL role name
|
||||
|
Loading…
Reference in New Issue
Block a user