From: <fir...@us...> - 2014-06-24 01:06:26
|
Revision: 59757 http://sourceforge.net/p/firebird/code/59757 Author: firebirds Date: 2014-06-24 01:06:22 +0000 (Tue, 24 Jun 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-06-23 11:17:25 UTC (rev 59756) +++ firebird/trunk/ChangeLog 2014-06-24 01:06:22 UTC (rev 59757) @@ -1,3 +1,7 @@ + 2014-06-23 11:17 alexpeshkoff + M src/jrd/jrd.cpp +Fixed deadlock privately reported by Dmitry Yemanov + 2014-06-22 02:30 asfernandes M src/burp/restore.epp Fixed CORE-4470 - gbak fails to restore database containing dependency between views and packaged functions. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-06-23 11:17:25 UTC (rev 59756) +++ firebird/trunk/src/jrd/build_no.h 2014-06-24 01:06:22 UTC (rev 59757) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31190 + FORMAL BUILD NUMBER:31191 */ -#define PRODUCT_VER_STRING "3.0.0.31190" -#define FILE_VER_STRING "WI-T3.0.0.31190" -#define LICENSE_VER_STRING "WI-T3.0.0.31190" -#define FILE_VER_NUMBER 3, 0, 0, 31190 +#define PRODUCT_VER_STRING "3.0.0.31191" +#define FILE_VER_STRING "WI-T3.0.0.31191" +#define LICENSE_VER_STRING "WI-T3.0.0.31191" +#define FILE_VER_NUMBER 3, 0, 0, 31191 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31190" +#define FB_BUILD_NO "31191" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-06-23 11:17:25 UTC (rev 59756) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-06-24 01:06:22 UTC (rev 59757) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31190 +BuildNum=31191 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2014-06-24 06:58:08
|
Revision: 59758 http://sourceforge.net/p/firebird/code/59758 Author: alexpeshkoff Date: 2014-06-24 06:58:05 +0000 (Tue, 24 Jun 2014) Log Message: ----------- Fixed CORE-4464: Duplicate tags for CREATE/ALTER USER not handled correctly Modified Paths: -------------- firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/include/gen/codetext.h firebird/trunk/src/include/gen/iberror.h firebird/trunk/src/include/gen/msgs.h firebird/trunk/src/include/gen/sql_code.h firebird/trunk/src/include/gen/sql_state.h firebird/trunk/src/jrd/UserManagement.cpp firebird/trunk/src/msgs/facilities2.sql firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2014-06-24 01:06:22 UTC (rev 59757) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2014-06-24 06:58:05 UTC (rev 59758) @@ -1596,6 +1596,8 @@ PARAMETER (GDS__set_invalid_role = 335545091) INTEGER*4 GDS__cursor_not_positioned PARAMETER (GDS__cursor_not_positioned = 335545092) + INTEGER*4 GDS__dup_attribute + PARAMETER (GDS__dup_attribute = 335545093) INTEGER*4 GDS__gfix_db_name PARAMETER (GDS__gfix_db_name = 335740929) INTEGER*4 GDS__gfix_invalid_sw Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2014-06-24 01:06:22 UTC (rev 59757) +++ firebird/trunk/lang_helpers/gds_codes.pas 2014-06-24 06:58:05 UTC (rev 59758) @@ -805,6 +805,7 @@ gds_miss_trusted_role = 335545090; gds_set_invalid_role = 335545091; gds_cursor_not_positioned = 335545092; + gds_dup_attribute = 335545093; gds_gfix_db_name = 335740929; gds_gfix_invalid_sw = 335740930; gds_gfix_incmp_sw = 335740932; Modified: firebird/trunk/src/include/gen/codetext.h =================================================================== --- firebird/trunk/src/include/gen/codetext.h 2014-06-24 01:06:22 UTC (rev 59757) +++ firebird/trunk/src/include/gen/codetext.h 2014-06-24 06:58:05 UTC (rev 59758) @@ -794,6 +794,7 @@ {"miss_trusted_role", 335545090}, {"set_invalid_role", 335545091}, {"cursor_not_positioned", 335545092}, + {"dup_attribute", 335545093}, {"gfix_db_name", 335740929}, {"gfix_invalid_sw", 335740930}, {"gfix_incmp_sw", 335740932}, Modified: firebird/trunk/src/include/gen/iberror.h =================================================================== --- firebird/trunk/src/include/gen/iberror.h 2014-06-24 01:06:22 UTC (rev 59757) +++ firebird/trunk/src/include/gen/iberror.h 2014-06-24 06:58:05 UTC (rev 59758) @@ -828,6 +828,7 @@ const ISC_STATUS isc_miss_trusted_role = 335545090L; const ISC_STATUS isc_set_invalid_role = 335545091L; const ISC_STATUS isc_cursor_not_positioned = 335545092L; +const ISC_STATUS isc_dup_attribute = 335545093L; const ISC_STATUS isc_gfix_db_name = 335740929L; const ISC_STATUS isc_gfix_invalid_sw = 335740930L; const ISC_STATUS isc_gfix_incmp_sw = 335740932L; @@ -1286,7 +1287,7 @@ const ISC_STATUS isc_trace_switch_param_miss = 337182758L; const ISC_STATUS isc_trace_param_act_notcompat = 337182759L; const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L; -const ISC_STATUS isc_err_max = 1230; +const ISC_STATUS isc_err_max = 1231; #else /* c definitions */ @@ -2084,6 +2085,7 @@ #define isc_miss_trusted_role 335545090L #define isc_set_invalid_role 335545091L #define isc_cursor_not_positioned 335545092L +#define isc_dup_attribute 335545093L #define isc_gfix_db_name 335740929L #define isc_gfix_invalid_sw 335740930L #define isc_gfix_incmp_sw 335740932L @@ -2542,7 +2544,7 @@ #define isc_trace_switch_param_miss 337182758L #define isc_trace_param_act_notcompat 337182759L #define isc_trace_mandatory_switch_miss 337182760L -#define isc_err_max 1230 +#define isc_err_max 1231 #endif Modified: firebird/trunk/src/include/gen/msgs.h =================================================================== --- firebird/trunk/src/include/gen/msgs.h 2014-06-24 01:06:22 UTC (rev 59757) +++ firebird/trunk/src/include/gen/msgs.h 2014-06-24 06:58:05 UTC (rev 59758) @@ -797,6 +797,7 @@ {335545090, "Your attachment has no trusted role"}, /* miss_trusted_role */ {335545091, "Role @1 is invalid or unavailable"}, /* set_invalid_role */ {335545092, "Cursor @1 is not positioned in a valid record"}, /* cursor_not_positioned */ + {335545093, "Duplicated user attribute @1"}, /* dup_attribute */ {335740929, "data base file name (@1) already given"}, /* gfix_db_name */ {335740930, "invalid switch @1"}, /* gfix_invalid_sw */ {335740932, "incompatible switch combination"}, /* gfix_incmp_sw */ Modified: firebird/trunk/src/include/gen/sql_code.h =================================================================== --- firebird/trunk/src/include/gen/sql_code.h 2014-06-24 01:06:22 UTC (rev 59757) +++ firebird/trunk/src/include/gen/sql_code.h 2014-06-24 06:58:05 UTC (rev 59758) @@ -793,6 +793,7 @@ {335545090, -901}, /* 770 miss_trusted_role */ {335545091, -901}, /* 771 set_invalid_role */ {335545092, -596}, /* 772 cursor_not_positioned */ + {335545093, -901}, /* 773 dup_attribute */ {335740929, -901}, /* 1 gfix_db_name */ {335740930, -901}, /* 2 gfix_invalid_sw */ {335740932, -901}, /* 4 gfix_incmp_sw */ Modified: firebird/trunk/src/include/gen/sql_state.h =================================================================== --- firebird/trunk/src/include/gen/sql_state.h 2014-06-24 01:06:22 UTC (rev 59757) +++ firebird/trunk/src/include/gen/sql_state.h 2014-06-24 06:58:05 UTC (rev 59758) @@ -780,7 +780,7 @@ {335545077, "08004"}, // 757 server_misconfigured {335545078, "0A000"}, // 758 alter_role {335545079, "42S01"}, // 759 map_already_exists - {335545080, "42S01"}, // 760 map_not_exists + {335545080, "42S02"}, // 760 map_not_exists {335545081, "08004"}, // 761 map_load {335545082, "08004"}, // 762 map_aster {335545083, "08004"}, // 763 map_multi @@ -793,6 +793,7 @@ {335545090, "0P000"}, // 770 miss_trusted_role {335545091, "0P000"}, // 771 set_invalid_role {335545092, "HY109"}, // 772 cursor_not_positioned + {335545093, "42702"}, // 773 dup_attribute {335740929, "00000"}, // 1 gfix_db_name {335740930, "00000"}, // 2 gfix_invalid_sw {335740932, "00000"}, // 4 gfix_incmp_sw Modified: firebird/trunk/src/jrd/UserManagement.cpp =================================================================== --- firebird/trunk/src/jrd/UserManagement.cpp 2014-06-24 01:06:22 UTC (rev 59757) +++ firebird/trunk/src/jrd/UserManagement.cpp 2014-06-24 06:58:05 UTC (rev 59758) @@ -257,6 +257,19 @@ ConfigFile::Parameters::const_iterator cur(ccf.getParameters().begin()); ConfigFile::Parameters::const_iterator curEnd(ccf.getParameters().end()); + // Dup check + ConfigFile::KeyType prev; + while (cur != curEnd) + { + if (cur->name == prev) + { + (Arg::Gds(isc_dup_attribute) << cur->name).raise(); + } + prev = cur->name; + ++cur; + } + cur = ccf.getParameters().begin(); + string merged; while (old != oldEnd && cur != curEnd) { Modified: firebird/trunk/src/msgs/facilities2.sql =================================================================== --- firebird/trunk/src/msgs/facilities2.sql 2014-06-24 01:06:22 UTC (rev 59757) +++ firebird/trunk/src/msgs/facilities2.sql 2014-06-24 06:58:05 UTC (rev 59758) @@ -1,7 +1,7 @@ /* MAX_NUMBER is the next number to be used, always one more than the highest message number. */ set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES (?, ?, ?, ?); -- -('2014-05-14 23:48:00', 'JRD', 0, 773) +('2014-06-24 10:13:56', 'JRD', 0, 774) ('2012-01-23 20:10:30', 'QLI', 1, 532) ('2013-11-13 15:59:10', 'GFIX', 3, 122) ('1996-11-07 13:39:40', 'GPRE', 4, 1) Modified: firebird/trunk/src/msgs/messages2.sql =================================================================== --- firebird/trunk/src/msgs/messages2.sql 2014-06-24 01:06:22 UTC (rev 59757) +++ firebird/trunk/src/msgs/messages2.sql 2014-06-24 06:58:05 UTC (rev 59758) @@ -880,6 +880,7 @@ ('miss_trusted_role', 'SetRoleNode::execute', 'StmtNodes.cpp', NULL, 0, 770, NULL, 'Your attachment has no trusted role', NULL, NULL); ('set_invalid_role', 'SetRoleNode::execute', 'StmtNodes.cpp', NULL, 0, 771, NULL, 'Role @1 is invalid or unavailable', NULL, NULL); ('cursor_not_positioned', NULL, NULL, NULL, 0, 772, NULL, 'Cursor @1 is not positioned in a valid record', NULL, NULL); +('dup_attribute', 'UserManagement::execute', 'UserManagement.cpp', NULL, 0, 773, NULL, 'Duplicated user attribute @1', NULL, NULL); -- QLI (NULL, NULL, NULL, NULL, 1, 0, NULL, 'expected type', NULL, NULL); (NULL, NULL, NULL, NULL, 1, 1, NULL, 'bad block type', NULL, NULL); Modified: firebird/trunk/src/msgs/system_errors2.sql =================================================================== --- firebird/trunk/src/msgs/system_errors2.sql 2014-06-24 01:06:22 UTC (rev 59757) +++ firebird/trunk/src/msgs/system_errors2.sql 2014-06-24 06:58:05 UTC (rev 59758) @@ -766,7 +766,7 @@ (-901, '08', '004', 0, 757, 'server_misconfigured', NULL, NULL); (-901, '0A', '000', 0, 758, 'alter_role', NULL, NULL); (-901, '42', 'S01', 0, 759, 'map_already_exists', NULL, NULL); -(-901, '42', 'S01', 0, 760, 'map_not_exists', NULL, NULL); +(-901, '42', 'S02', 0, 760, 'map_not_exists', NULL, NULL); (-901, '08', '004', 0, 761, 'map_load', NULL, NULL); (-901, '08', '004', 0, 762, 'map_aster', NULL, NULL); (-901, '08', '004', 0, 763, 'map_multi', NULL, NULL); @@ -779,6 +779,7 @@ (-901, '0P', '000', 0, 770, 'miss_trusted_role', NULL, NULL); (-901, '0P', '000', 0, 771, 'set_invalid_role', NULL, NULL); (-596, 'HY', '109', 0, 772, 'cursor_not_positioned', NULL, NULL) +(-901, '42', '702', 0, 773, 'dup_attribute', NULL, NULL); -- GFIX (-901, '00', '000', 3, 1, 'gfix_db_name', NULL, NULL) (-901, '00', '000', 3, 2, 'gfix_invalid_sw', NULL, NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-06-25 01:36:22
|
Revision: 59760 http://sourceforge.net/p/firebird/code/59760 Author: firebirds Date: 2014-06-25 01:36:14 +0000 (Wed, 25 Jun 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-06-24 10:16:24 UTC (rev 59759) +++ firebird/trunk/ChangeLog 2014-06-25 01:36:14 UTC (rev 59760) @@ -1,3 +1,25 @@ + 2014-06-24 10:16 alexpeshkoff + M src/burp/backup.epp + M src/burp/restore.epp + M src/jrd/constants.h + M src/jrd/ini.epp + M src/jrd/scl.epp +Avoid non-standard use of RDB$ROLES.RDB$SYSTEM_FLAG + + 2014-06-24 06:58 alexpeshkoff + M lang_helpers/gds_codes.ftn + M lang_helpers/gds_codes.pas + M src/include/gen/codetext.h + M src/include/gen/iberror.h + M src/include/gen/msgs.h + M src/include/gen/sql_code.h + M src/include/gen/sql_state.h + M src/jrd/UserManagement.cpp + M src/msgs/facilities2.sql + M src/msgs/messages2.sql + M src/msgs/system_errors2.sql +Fixed CORE-4464: Duplicate tags for CREATE/ALTER USER not handled correctly + 2014-06-23 11:17 alexpeshkoff M src/jrd/jrd.cpp Fixed deadlock privately reported by Dmitry Yemanov Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-06-24 10:16:24 UTC (rev 59759) +++ firebird/trunk/src/jrd/build_no.h 2014-06-25 01:36:14 UTC (rev 59760) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31191 + FORMAL BUILD NUMBER:31193 */ -#define PRODUCT_VER_STRING "3.0.0.31191" -#define FILE_VER_STRING "WI-T3.0.0.31191" -#define LICENSE_VER_STRING "WI-T3.0.0.31191" -#define FILE_VER_NUMBER 3, 0, 0, 31191 +#define PRODUCT_VER_STRING "3.0.0.31193" +#define FILE_VER_STRING "WI-T3.0.0.31193" +#define LICENSE_VER_STRING "WI-T3.0.0.31193" +#define FILE_VER_NUMBER 3, 0, 0, 31193 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31191" +#define FB_BUILD_NO "31193" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-06-24 10:16:24 UTC (rev 59759) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-06-25 01:36:14 UTC (rev 59760) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31191 +BuildNum=31193 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-06-26 00:29:32
|
Revision: 59768 http://sourceforge.net/p/firebird/code/59768 Author: firebirds Date: 2014-06-26 00:29:29 +0000 (Thu, 26 Jun 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-06-25 20:04:02 UTC (rev 59767) +++ firebird/trunk/ChangeLog 2014-06-26 00:29:29 UTC (rev 59768) @@ -1,3 +1,25 @@ + 2014-06-25 11:20 alexpeshkoff + M src/alice/alice.cpp + M src/alice/alice.h + M src/alice/aliceswi.h + M src/alice/exe.cpp + M src/alice/tdr.cpp + M src/burp/burp.cpp + M src/burp/burp.h + M src/burp/burpswi.h + M src/burp/restore.epp + M src/jrd/constants.h + M src/jrd/svc.cpp + M src/jrd/tra.cpp + M src/jrd/trace/TraceCmdLine.cpp + M src/jrd/trace/traceswi.h + M src/utilities/gsec/gsecswi.h + M src/utilities/gstat/dba.epp + M src/utilities/gstat/dbaswi.h + M src/utilities/nbackup/nbackup.cpp + M src/utilities/nbackup/nbkswi.h +Cleanup - removed unused any more service time only switches trusted_user & trusted_role + 2014-06-24 10:16 alexpeshkoff M src/burp/backup.epp M src/burp/restore.epp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-06-25 20:04:02 UTC (rev 59767) +++ firebird/trunk/src/jrd/build_no.h 2014-06-26 00:29:29 UTC (rev 59768) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31193 + FORMAL BUILD NUMBER:31194 */ -#define PRODUCT_VER_STRING "3.0.0.31193" -#define FILE_VER_STRING "WI-T3.0.0.31193" -#define LICENSE_VER_STRING "WI-T3.0.0.31193" -#define FILE_VER_NUMBER 3, 0, 0, 31193 +#define PRODUCT_VER_STRING "3.0.0.31194" +#define FILE_VER_STRING "WI-T3.0.0.31194" +#define LICENSE_VER_STRING "WI-T3.0.0.31194" +#define FILE_VER_NUMBER 3, 0, 0, 31194 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31193" +#define FB_BUILD_NO "31194" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-06-25 20:04:02 UTC (rev 59767) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-06-26 00:29:29 UTC (rev 59768) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31193 +BuildNum=31194 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-06-27 00:40:07
|
Revision: 59776 http://sourceforge.net/p/firebird/code/59776 Author: firebirds Date: 2014-06-27 00:39:59 +0000 (Fri, 27 Jun 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-06-26 17:23:44 UTC (rev 59775) +++ firebird/trunk/ChangeLog 2014-06-27 00:39:59 UTC (rev 59776) @@ -1,3 +1,35 @@ + 2014-06-26 16:14 fsg + M src/isql/extract.epp + M src/jrd/obj.h +some more enhancements to isqls extract utility +split extraction of functions and procedures in two parts (header and body) + + 2014-06-26 09:43 alexpeshkoff + M src/jrd/DatabaseSnapshot.cpp +Fixed very frequent segfault in monitoring code (CS/SC): tdbb->attachment was not set in thread_db::getCharSet() function used to convert monitoring strings + + 2014-06-26 09:37 alexpeshkoff + M src/burp/backup.epp + M src/burp/restore.epp + M src/dsql/DdlNodes.epp + M src/include/gen/ids.h + M src/isql/show.epp + M src/jrd/Mapping.cpp + M src/jrd/idx.h + M src/jrd/names.h + M src/jrd/opt.cpp + M src/jrd/relations.h + M src/jrd/vio.cpp +Renamed mapping-related tables as was discussed in devel + + 2014-06-26 07:32 fsg + M src/isql/extract.epp +extract domain definitions before functions, they may need them + + 2014-06-26 07:09 fsg + M src/isql/extract.epp +fixed extract of return parameter of external UDF's + 2014-06-25 11:20 alexpeshkoff M src/alice/alice.cpp M src/alice/alice.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-06-26 17:23:44 UTC (rev 59775) +++ firebird/trunk/src/jrd/build_no.h 2014-06-27 00:39:59 UTC (rev 59776) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31194 + FORMAL BUILD NUMBER:31199 */ -#define PRODUCT_VER_STRING "3.0.0.31194" -#define FILE_VER_STRING "WI-T3.0.0.31194" -#define LICENSE_VER_STRING "WI-T3.0.0.31194" -#define FILE_VER_NUMBER 3, 0, 0, 31194 +#define PRODUCT_VER_STRING "3.0.0.31199" +#define FILE_VER_STRING "WI-T3.0.0.31199" +#define LICENSE_VER_STRING "WI-T3.0.0.31199" +#define FILE_VER_NUMBER 3, 0, 0, 31199 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31194" +#define FB_BUILD_NO "31199" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-06-26 17:23:44 UTC (rev 59775) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-06-27 00:39:59 UTC (rev 59776) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31194 +BuildNum=31199 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-06-28 00:35:43
|
Revision: 59782 http://sourceforge.net/p/firebird/code/59782 Author: firebirds Date: 2014-06-28 00:35:36 +0000 (Sat, 28 Jun 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-06-27 16:29:14 UTC (rev 59781) +++ firebird/trunk/ChangeLog 2014-06-28 00:35:36 UTC (rev 59782) @@ -1,3 +1,11 @@ + 2014-06-27 11:58 alexpeshkoff + M src/auth/SecureRemotePassword/manage/SrpManagement.cpp +Fixed CORE-4468: CREATE USER GRANT ADMIN ROLE does not work + + 2014-06-27 11:32 alexpeshkoff + M src/auth/SecurityDatabase/LegacyManagement.epp +cleanup + 2014-06-26 16:14 fsg M src/isql/extract.epp M src/jrd/obj.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-06-27 16:29:14 UTC (rev 59781) +++ firebird/trunk/src/jrd/build_no.h 2014-06-28 00:35:36 UTC (rev 59782) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31199 + FORMAL BUILD NUMBER:31201 */ -#define PRODUCT_VER_STRING "3.0.0.31199" -#define FILE_VER_STRING "WI-T3.0.0.31199" -#define LICENSE_VER_STRING "WI-T3.0.0.31199" -#define FILE_VER_NUMBER 3, 0, 0, 31199 +#define PRODUCT_VER_STRING "3.0.0.31201" +#define FILE_VER_STRING "WI-T3.0.0.31201" +#define LICENSE_VER_STRING "WI-T3.0.0.31201" +#define FILE_VER_NUMBER 3, 0, 0, 31201 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31199" +#define FB_BUILD_NO "31201" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-06-27 16:29:14 UTC (rev 59781) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-06-28 00:35:36 UTC (rev 59782) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31199 +BuildNum=31201 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-06-29 00:36:09
|
Revision: 59790 http://sourceforge.net/p/firebird/code/59790 Author: firebirds Date: 2014-06-29 00:36:05 +0000 (Sun, 29 Jun 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-06-28 12:41:17 UTC (rev 59789) +++ firebird/trunk/ChangeLog 2014-06-29 00:36:05 UTC (rev 59790) @@ -1,3 +1,11 @@ + 2014-06-28 09:58 alexpeshkoff + M src/auth/SecureRemotePassword/manage/SrpManagement.cpp + M src/include/gen/ids.h + M src/jrd/UserManagement.cpp + M src/jrd/names.h + M src/jrd/relations.h +Fixed CORE-4469: Add field in SEC$USERS reflecting whether a user has RDB$ADMIN role in security database + 2014-06-27 11:58 alexpeshkoff M src/auth/SecureRemotePassword/manage/SrpManagement.cpp Fixed CORE-4468: CREATE USER GRANT ADMIN ROLE does not work Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-06-28 12:41:17 UTC (rev 59789) +++ firebird/trunk/src/jrd/build_no.h 2014-06-29 00:36:05 UTC (rev 59790) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31201 + FORMAL BUILD NUMBER:31202 */ -#define PRODUCT_VER_STRING "3.0.0.31201" -#define FILE_VER_STRING "WI-T3.0.0.31201" -#define LICENSE_VER_STRING "WI-T3.0.0.31201" -#define FILE_VER_NUMBER 3, 0, 0, 31201 +#define PRODUCT_VER_STRING "3.0.0.31202" +#define FILE_VER_STRING "WI-T3.0.0.31202" +#define LICENSE_VER_STRING "WI-T3.0.0.31202" +#define FILE_VER_NUMBER 3, 0, 0, 31202 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31201" +#define FB_BUILD_NO "31202" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-06-28 12:41:17 UTC (rev 59789) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-06-29 00:36:05 UTC (rev 59790) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31201 +BuildNum=31202 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-07-01 00:18:10
|
Revision: 59804 http://sourceforge.net/p/firebird/code/59804 Author: firebirds Date: 2014-07-01 00:18:05 +0000 (Tue, 01 Jul 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-06-30 19:51:24 UTC (rev 59803) +++ firebird/trunk/ChangeLog 2014-07-01 00:18:05 UTC (rev 59804) @@ -1,3 +1,13 @@ + 2014-06-30 11:45 alexpeshkoff + M src/common/isc.cpp + M src/common/isc_proto.h + M src/common/isc_sync.cpp + M src/jrd/svc.cpp + M src/jrd/trace/TraceConfigStorage.cpp + M src/jrd/trace/TraceLog.cpp + M src/yvalve/gds.cpp +Fixed CORE-4475: attempt to create lock files directory fails during cleanup + 2014-06-28 09:58 alexpeshkoff M src/auth/SecureRemotePassword/manage/SrpManagement.cpp M src/include/gen/ids.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-06-30 19:51:24 UTC (rev 59803) +++ firebird/trunk/src/jrd/build_no.h 2014-07-01 00:18:05 UTC (rev 59804) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31202 + FORMAL BUILD NUMBER:31203 */ -#define PRODUCT_VER_STRING "3.0.0.31202" -#define FILE_VER_STRING "WI-T3.0.0.31202" -#define LICENSE_VER_STRING "WI-T3.0.0.31202" -#define FILE_VER_NUMBER 3, 0, 0, 31202 +#define PRODUCT_VER_STRING "3.0.0.31203" +#define FILE_VER_STRING "WI-T3.0.0.31203" +#define LICENSE_VER_STRING "WI-T3.0.0.31203" +#define FILE_VER_NUMBER 3, 0, 0, 31203 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31202" +#define FB_BUILD_NO "31203" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-06-30 19:51:24 UTC (rev 59803) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-07-01 00:18:05 UTC (rev 59804) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31202 +BuildNum=31203 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-07-02 00:30:49
|
Revision: 59807 http://sourceforge.net/p/firebird/code/59807 Author: firebirds Date: 2014-07-02 00:30:41 +0000 (Wed, 02 Jul 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-07-01 08:23:07 UTC (rev 59806) +++ firebird/trunk/ChangeLog 2014-07-02 00:30:41 UTC (rev 59807) @@ -1,3 +1,7 @@ + 2014-07-01 08:23 alexpeshkoff + M src/jrd/types.h +Fixed CORE-4477: Field RDB$MAP_TO_TYPE is not present in RDB$TYPES + 2014-06-30 11:45 alexpeshkoff M src/common/isc.cpp M src/common/isc_proto.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-07-01 08:23:07 UTC (rev 59806) +++ firebird/trunk/src/jrd/build_no.h 2014-07-02 00:30:41 UTC (rev 59807) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31203 + FORMAL BUILD NUMBER:31204 */ -#define PRODUCT_VER_STRING "3.0.0.31203" -#define FILE_VER_STRING "WI-T3.0.0.31203" -#define LICENSE_VER_STRING "WI-T3.0.0.31203" -#define FILE_VER_NUMBER 3, 0, 0, 31203 +#define PRODUCT_VER_STRING "3.0.0.31204" +#define FILE_VER_STRING "WI-T3.0.0.31204" +#define LICENSE_VER_STRING "WI-T3.0.0.31204" +#define FILE_VER_NUMBER 3, 0, 0, 31204 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31203" +#define FB_BUILD_NO "31204" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-07-01 08:23:07 UTC (rev 59806) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-07-02 00:30:41 UTC (rev 59807) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31203 +BuildNum=31204 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2014-07-02 12:57:20
|
Revision: 59811 http://sourceforge.net/p/firebird/code/59811 Author: alexpeshkoff Date: 2014-07-02 12:57:12 +0000 (Wed, 02 Jul 2014) Log Message: ----------- Added first parameter IStatus* to a lot of functions in API interfaces Modified Paths: -------------- firebird/trunk/examples/dbcrypt/CryptKeyHolder.cpp firebird/trunk/examples/dbcrypt/DbCrypt.cpp firebird/trunk/src/auth/AuthDbg.cpp firebird/trunk/src/auth/SecureRemotePassword/manage/SrpManagement.cpp firebird/trunk/src/auth/SecureRemotePassword/server/SrpServer.cpp firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp firebird/trunk/src/common/Auth.cpp firebird/trunk/src/common/Auth.h firebird/trunk/src/common/MsgMetadata.cpp firebird/trunk/src/common/call_service.cpp firebird/trunk/src/common/classes/GetPlugins.h firebird/trunk/src/common/classes/ImplementHelper.h firebird/trunk/src/common/classes/fb_string.cpp firebird/trunk/src/common/classes/fb_string.h firebird/trunk/src/common/security.cpp firebird/trunk/src/common/security.h firebird/trunk/src/dsql/DdlNodes.epp firebird/trunk/src/dsql/dsql.cpp firebird/trunk/src/include/firebird/Auth.h firebird/trunk/src/include/firebird/Plugin.h firebird/trunk/src/include/firebird/Provider.h firebird/trunk/src/include/firebird/Timer.h firebird/trunk/src/include/firebird/Utl.h firebird/trunk/src/isql/show.epp firebird/trunk/src/jrd/Database.cpp firebird/trunk/src/jrd/UserManagement.cpp firebird/trunk/src/jrd/jrd.cpp firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp firebird/trunk/src/remote/client/BlrFromMessage.cpp firebird/trunk/src/utilities/gsec/gsec.cpp firebird/trunk/src/yvalve/MasterImplementation.cpp firebird/trunk/src/yvalve/PluginManager.cpp firebird/trunk/src/yvalve/PluginManager.h firebird/trunk/src/yvalve/alt.cpp firebird/trunk/src/yvalve/utl.cpp firebird/trunk/src/yvalve/why.cpp Modified: firebird/trunk/examples/dbcrypt/CryptKeyHolder.cpp =================================================================== --- firebird/trunk/examples/dbcrypt/CryptKeyHolder.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/examples/dbcrypt/CryptKeyHolder.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -205,19 +205,22 @@ status->init(); if (key != 0) - { return 1; - } - IConfig* def = config->getDefaultConfig(); - IConfigEntry* confEntry = def->find("Auto"); + IConfig* def = config->getDefaultConfig(status); + if (!status->isSuccess()) + return 1; + + IConfigEntry* confEntry = def->find(status, "Auto"); def->release(); + if (!status->isSuccess()) + return 1; if (confEntry) { - char v = *(confEntry->getValue()); + FB_BOOLEAN b = confEntry->getBoolValue(); confEntry->release(); - if (v == '1' || v == 'y' || v == 'Y' || v == 't' || v == 'T') + if (b) { key = 0x5a; return 1; @@ -256,11 +259,19 @@ return &module; } - IPluginBase* FB_CARG createPlugin(IPluginConfig* factoryParameter) + IPluginBase* FB_CARG createPlugin(IStatus* status, IPluginConfig* factoryParameter) { - CryptKeyHolder* p = new CryptKeyHolder(factoryParameter); - p->addRef(); - return p; + try + { + CryptKeyHolder* p = new CryptKeyHolder(factoryParameter); + p->addRef(); + return p; + } + catch(const Exception& ex) + { + ex.stuffException(status); + } + return NULL; } }; Modified: firebird/trunk/examples/dbcrypt/DbCrypt.cpp =================================================================== --- firebird/trunk/examples/dbcrypt/DbCrypt.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/examples/dbcrypt/DbCrypt.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -200,9 +200,15 @@ if (key != 0) return; - IConfig* def = config->getDefaultConfig(); - IConfigEntry* confEntry = def->find("Auto"); + IConfig* def = config->getDefaultConfig(status); + if (!status->isSuccess()) + return; + + IConfigEntry* confEntry = def->find(status, "Auto"); def->release(); + if (!status->isSuccess()) + return; + if (confEntry) { char v = *(confEntry->getValue()); @@ -218,14 +224,10 @@ { ICryptKeyCallback* callback = sources[n]->keyHandle(status, "sample"); if (!status->isSuccess()) - { return; - } if (callback && callback->callback(0, NULL, 1, &key) == 1) - { return; - } } key = 0; @@ -245,11 +247,19 @@ return &module; } - IPluginBase* FB_CARG createPlugin(IPluginConfig* factoryParameter) + IPluginBase* FB_CARG createPlugin(IStatus* status, IPluginConfig* factoryParameter) { - DbCrypt* p = new DbCrypt(factoryParameter); - p->addRef(); - return p; + try + { + DbCrypt* p = new DbCrypt(factoryParameter); + p->addRef(); + return p; + } + catch(const Exception& ex) + { + ex.stuffException(status); + } + return NULL; } }; Modified: firebird/trunk/src/auth/AuthDbg.cpp =================================================================== --- firebird/trunk/src/auth/AuthDbg.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/auth/AuthDbg.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -28,6 +28,7 @@ #include "firebird.h" #include "../auth/AuthDbg.h" #include "../jrd/ibase.h" +#include "../common/StatusHolder.h" #ifdef AUTH_DEBUG @@ -55,9 +56,12 @@ namespace Auth { DebugServer::DebugServer(Firebird::IPluginConfig* pConf) - : str(getPool()), - config(Firebird::REF_NO_INCR, pConf->getDefaultConfig()) -{ } + : str(getPool()) +{ + Firebird::LocalStatus s; + config.assignRefNoIncr(pConf->getDefaultConfig(&s)); + check(&s); +} int FB_CARG DebugServer::authenticate(Firebird::IStatus* status, IServerBlock* sb, IWriter* writerInterface) @@ -94,14 +98,19 @@ #ifdef AUTH_VERBOSE fprintf(stderr, "DebugServer::authenticate2: %s\n", str.c_str()); #endif - writerInterface->add(str.c_str()); + Firebird::LocalStatus s; + writerInterface->add(&s, str.c_str()); + check(&s); str.erase(); - Firebird::RefPtr<Firebird::IConfigEntry> group(Firebird::REF_NO_INCR, config->find("GROUP")); + Firebird::RefPtr<Firebird::IConfigEntry> group(Firebird::REF_NO_INCR, config->find(&s, "GROUP")); + check(&s); if (group) { - writerInterface->add(group->getValue()); - writerInterface->setType("GROUP"); + writerInterface->add(&s, group->getValue()); + check(&s); + writerInterface->setType(&s, "GROUP"); + check(&s); } return AUTH_SUCCESS; Modified: firebird/trunk/src/auth/SecureRemotePassword/manage/SrpManagement.cpp =================================================================== --- firebird/trunk/src/auth/SecureRemotePassword/manage/SrpManagement.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/auth/SecureRemotePassword/manage/SrpManagement.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -56,8 +56,12 @@ { public: explicit SrpManagement(Firebird::IPluginConfig* par) - : config(Firebird::REF_NO_INCR, par->getFirebirdConf()), upCount(0), delCount(0) - { } + : upCount(0), delCount(0) + { + Firebird::LocalStatus s; + config.assignRefNoIncr(par->getFirebirdConf(&s)); + check(&s); + } private: void prepareDataStructures() @@ -497,8 +501,10 @@ stmt->free(status); check(status); - user->admin()->set(0); - user->admin()->setEntered(1); + user->admin()->set(status, 0); + check(status); + user->admin()->setEntered(status, 1); + check(status); grantRevokeAdmin(user, true); } catch (const Firebird::Exception&) @@ -556,18 +562,17 @@ while (rs->fetchNext(status, di.getBuffer())) { - check(status); - listField(user->userName(), login); listField(user->firstName(), first); listField(user->middleName(), middle); listField(user->lastName(), last); - listField(status, user->comment(), comment); - listField(status, user->attributes(), attr); + listField(user->comment(), comment); + listField(user->attributes(), attr); listField(user->active(), active); listField(user->admin(), admin); - callback->list(user); + callback->list(status, user); + check(status); } check(status); @@ -796,49 +801,58 @@ static void listField(Auth::ICharUserField* to, Varfield& from) { - to->setEntered(from.null ? 0 : 1); + Firebird::LocalStatus st; + to->setEntered(&st, from.null ? 0 : 1); + check(&st); if (!from.null) { - to->set(from); + to->set(&st, from); + check(&st); } } static void listField(Auth::IIntUserField* to, Boolean& from) { - to->setEntered(from.null ? 0 : 1); + Firebird::LocalStatus st; + to->setEntered(&st, from.null ? 0 : 1); + check(&st); if (!from.null) { - to->set(from); + to->set(&st, from); + check(&st); } } - void listField(Firebird::IStatus* st, Auth::ICharUserField* to, Blob& from) + void listField(Auth::ICharUserField* to, Blob& from) { - to->setEntered(from.null ? 0 : 1); + Firebird::LocalStatus st; + to->setEntered(&st, from.null ? 0 : 1); + check(&st); if (!from.null) { Firebird::string s; Firebird::IBlob* blob = NULL; try { - blob = att->openBlob(st, tra, &from); - check(st); + blob = att->openBlob(&st, tra, &from); + check(&st); char segbuf[256]; unsigned len; - while ( (len = blob->getSegment(st, sizeof(segbuf), segbuf)) ) + while ( (len = blob->getSegment(&st, sizeof(segbuf), segbuf)) ) { - if (st->get()[1] != isc_segment) - check(st); + if (st.get()[1] != isc_segment) + check(&st); s.append(segbuf, len); } - if (st->get()[1] != isc_segstr_eof) - check(st); + if (st.get()[1] != isc_segstr_eof) + check(&st); - blob->close(st); - check(st); + blob->close(&st); + check(&st); - to->set(s.c_str()); + to->set(&st, s.c_str()); + check(&st); } catch (const Firebird::Exception&) { Modified: firebird/trunk/src/auth/SecureRemotePassword/server/SrpServer.cpp =================================================================== --- firebird/trunk/src/auth/SecureRemotePassword/server/SrpServer.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/auth/SecureRemotePassword/server/SrpServer.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -57,8 +57,12 @@ : server(NULL), data(getPool()), account(getPool()), clientPubKey(getPool()), serverPubKey(getPool()), verifier(getPool()), salt(getPool()), sessionKey(getPool()), - config(REF_NO_INCR, par->getFirebirdConf()), secDbName(NULL) - { } + secDbName(NULL) + { + Firebird::LocalStatus s; + config.assignRefNoIncr(par->getFirebirdConf(&s)); + check(&s); + } // IServer implementation int FB_CARG authenticate(IStatus* status, IServerBlock* sBlock, IWriter* writerInterface); @@ -266,8 +270,16 @@ if (clientProof == serverProof) { MasterInterfacePtr()->upgradeInterface(writerInterface, FB_AUTH_WRITER_VERSION, upInfo); - writerInterface->add(account.c_str()); - writerInterface->setDb(secDbName); + writerInterface->add(status, account.c_str()); + if (!status->isSuccess()) + { + return AUTH_FAILED; + } + writerInterface->setDb(status, secDbName); + if (!status->isSuccess()) + { + return AUTH_FAILED; + } return AUTH_SUCCESS; } } Modified: firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp =================================================================== --- firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp 2014-07-02 12:57:12 UTC (rev 59811) @@ -40,6 +40,7 @@ #include "../auth/SecurityDatabase/LegacyManagement.h" #include "../common/classes/ImplementHelper.h" #include "../common/classes/ClumpletWriter.h" +#include "../common/StatusHolder.h" #include "firebird/Plugin.h" static Firebird::MakeUpgradeInfo<> upInfo; @@ -105,8 +106,12 @@ namespace Auth { SecurityDatabaseManagement::SecurityDatabaseManagement(Firebird::IPluginConfig* par) - : config(Firebird::REF_NO_INCR, par->getFirebirdConf()), database(0), transaction(0) -{ } + : database(0), transaction(0) +{ + Firebird::LocalStatus s; + config.assignRefNoIncr(par->getFirebirdConf(&s)); + check(&s); +} void FB_CARG SecurityDatabaseManagement::start(Firebird::IStatus* st, ILogonInfo* logonInfo) { @@ -535,8 +540,10 @@ if (!ret && !found) ret = GsecMsg22; // gsec - record not found for user: - user->admin()->set(0); - user->admin()->setEntered(1); + user->admin()->set(st, 0); + check(st); + user->admin()->setEntered(st, 1); + check(st); if (ret == 0 && !grantRevokeAdmin(isc_status, database, transaction, user)) { ret = GsecMsg24; @@ -550,7 +557,11 @@ found = false; if (!user->userName()->entered()) { + Firebird::LocalStatus s2; + Firebird::IStatus* s = st; FOR (TRANSACTION_HANDLE transaction REQUEST_HANDLE request) U IN PLG$VIEW_USERS + try + { { Firebird::string attr, a1, a2, a3; @@ -564,22 +575,37 @@ a3.printf("GroupName=%s\n", U.PLG$GROUP_NAME); attr = a1 + a2 + a3; - user->attributes()->set(attr.c_str()); - user->attributes()->setEntered(attr.hasData() ? 1 : 0); + user->attributes()->set(s, attr.c_str()); + check(s); + user->attributes()->setEntered(s, attr.hasData() ? 1 : 0); + check(s); } - user->userName()->set(U.PLG$USER_NAME); - user->userName()->setEntered(U.PLG$USER_NAME.NULL ? 0 : 1); - user->password()->set(""); - user->password()->setEntered(0); - user->firstName()->set(U.PLG$FIRST_NAME); - user->firstName()->setEntered(U.PLG$FIRST_NAME.NULL ? 0 : 1); - user->middleName()->set(U.PLG$MIDDLE_NAME); - user->middleName()->setEntered(U.PLG$MIDDLE_NAME.NULL ? 0 : 1); - user->lastName()->set(U.PLG$LAST_NAME); - user->lastName()->setEntered(U.PLG$LAST_NAME.NULL ? 0 : 1); + user->userName()->set(s, U.PLG$USER_NAME); + check(s); + user->userName()->setEntered(s, U.PLG$USER_NAME.NULL ? 0 : 1); + check(s); + user->password()->set(s, ""); + check(s); + user->password()->setEntered(s, 0); + check(s); + user->firstName()->set(s, U.PLG$FIRST_NAME); + check(s); + user->firstName()->setEntered(s, U.PLG$FIRST_NAME.NULL ? 0 : 1); + check(s); + user->middleName()->set(s, U.PLG$MIDDLE_NAME); + check(s); + user->middleName()->setEntered(s, U.PLG$MIDDLE_NAME.NULL ? 0 : 1); + check(s); + user->lastName()->set(s, U.PLG$LAST_NAME); + check(s); + user->lastName()->setEntered(s, U.PLG$LAST_NAME.NULL ? 0 : 1); + check(s); - user->admin()->set(0); + user->admin()->set(s, 0); + check(s); + user->admin()->setEntered(s, 1); + check(s); FOR (TRANSACTION_HANDLE transaction REQUEST_HANDLE request2) P IN RDB$USER_PRIVILEGES @@ -587,24 +613,39 @@ P.RDB$RELATION_NAME EQ 'RDB$ADMIN' AND P.RDB$PRIVILEGE EQ 'M' { - user->admin()->set(1); + user->admin()->set(s, 1); } END_FOR + check(s); - callback->list(user); + callback->list(s, user); + check(s); found = true; + } + catch(const Firebird::Exception& ex) + { + ex.stuffException(s); + s = &s2; + } END_FOR ON_ERROR ret = GsecMsg28; // gsec - find/display record error END_ERROR; + + // real error raise - out of gpre's FOR loop + check(st); } else { Firebird::string attr, a1, a2, a3; + Firebird::LocalStatus s2; + Firebird::IStatus* s = st; FOR (TRANSACTION_HANDLE transaction REQUEST_HANDLE request) U IN PLG$VIEW_USERS WITH U.PLG$USER_NAME EQ user->userName()->get() + try + { if (!U.PLG$UID.NULL) a1.printf("Uid=%d\n", U.PLG$UID); @@ -615,39 +656,66 @@ a3.printf("GroupName=%s\n", U.PLG$GROUP_NAME); attr = a1 + a2 + a3; - user->attributes()->set(attr.c_str()); - user->attributes()->setEntered(attr.hasData() ? 1 : 0); + user->attributes()->set(s, attr.c_str()); + check(s); + user->attributes()->setEntered(s, attr.hasData() ? 1 : 0); + check(s); - user->userName()->set(U.PLG$USER_NAME); - user->userName()->setEntered(U.PLG$USER_NAME.NULL ? 0 : 1); - user->password()->set(""); - user->password()->setEntered(0); - user->firstName()->set(U.PLG$FIRST_NAME); - user->firstName()->setEntered(U.PLG$FIRST_NAME.NULL ? 0 : 1); - user->middleName()->set(U.PLG$MIDDLE_NAME); - user->middleName()->setEntered(U.PLG$MIDDLE_NAME.NULL ? 0 : 1); - user->lastName()->set(U.PLG$LAST_NAME); - user->lastName()->setEntered(U.PLG$LAST_NAME.NULL ? 0 : 1); + user->userName()->set(s, U.PLG$USER_NAME); + check(s); + user->userName()->setEntered(s, U.PLG$USER_NAME.NULL ? 0 : 1); + check(s); + user->password()->set(s, ""); + check(s); + user->password()->setEntered(s, 0); + check(s); + user->firstName()->set(s, U.PLG$FIRST_NAME); + check(s); + user->firstName()->setEntered(s, U.PLG$FIRST_NAME.NULL ? 0 : 1); + check(s); + user->middleName()->set(s, U.PLG$MIDDLE_NAME); + check(s); + user->middleName()->setEntered(s, U.PLG$MIDDLE_NAME.NULL ? 0 : 1); + check(s); + user->lastName()->set(s, U.PLG$LAST_NAME); + check(s); + user->lastName()->setEntered(s, U.PLG$LAST_NAME.NULL ? 0 : 1); + check(s); - user->admin()->set(0); + user->admin()->set(s, 0); + check(s); + user->admin()->setEntered(s, 1); + check(s); + FOR (TRANSACTION_HANDLE transaction REQUEST_HANDLE request2) P IN RDB$USER_PRIVILEGES WITH P.RDB$USER EQ U.PLG$USER_NAME AND P.RDB$RELATION_NAME EQ 'RDB$ADMIN' AND P.RDB$PRIVILEGE EQ 'M' { - user->admin()->set(1); + user->admin()->set(s, 1); } END_FOR + check(s); - callback->list(user); + callback->list(s, user); + check(s); found = true; + } + catch(const Firebird::Exception& ex) + { + ex.stuffException(s); + s = &s2; + } END_FOR ON_ERROR ret = GsecMsg28; // gsec - find/display record error END_ERROR; + + // real error raise - out of gpre's FOR loop + check(st); } break; Modified: firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp =================================================================== --- firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -349,9 +349,12 @@ } } + LocalStatus s; MasterInterfacePtr()->upgradeInterface(authBlock, FB_AUTH_WRITER_VERSION, upInfo); - authBlock->add(login.c_str()); - authBlock->setDb(secureDbName); + authBlock->add(&s, login.c_str()); + check(&s); + authBlock->setDb(&s, secureDbName); + check(&s); return AUTH_SUCCESS; } @@ -426,7 +429,9 @@ { if (curInstances[i]) { - TimerInterfacePtr()->stop(curInstances[i]); + LocalStatus s; + TimerInterfacePtr()->stop(&s, curInstances[i]); + check(&s); curInstances[i]->release(); curInstances[i] = NULL; } @@ -460,7 +465,9 @@ { PathName secDbName; { // config scope - RefPtr<IFirebirdConf> config(REF_NO_INCR, iParameter->getFirebirdConf()); + LocalStatus s; + RefPtr<IFirebirdConf> config(REF_NO_INCR, iParameter->getFirebirdConf(&s)); + check(&s); if (secDbKey == INIT_KEY) { @@ -501,10 +508,11 @@ int rc = instance->verify(writerInterface, sBlock); #define USE_ATT_RQ_CACHE #ifdef USE_ATT_RQ_CACHE - TimerInterfacePtr()->start(instance, 10 * 1000 * 1000); -#else - instance->handler(); + LocalStatus s; + TimerInterfacePtr()->start(&s, instance, 10 * 1000 * 1000); + if (!s.isSuccess()) #endif + instance->handler(); return rc; } catch (const Firebird::Exception& ex) Modified: firebird/trunk/src/common/Auth.cpp =================================================================== --- firebird/trunk/src/common/Auth.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/common/Auth.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -60,18 +60,25 @@ sequence = 0; } -void WriterImplementation::add(const char* name) +void WriterImplementation::add(Firebird::IStatus* st, const char* name) { - putLevel(); + try + { + putLevel(); - current.clear(); - current.insertString(AuthReader::AUTH_NAME, name); - fb_assert(plugin.hasData()); - if (plugin.hasData()) + current.clear(); + current.insertString(AuthReader::AUTH_NAME, name); + fb_assert(plugin.hasData()); + if (plugin.hasData()) + { + current.insertString(AuthReader::AUTH_PLUGIN, plugin); + } + type = "USER"; + } + catch(const Firebird::Exception& ex) { - current.insertString(AuthReader::AUTH_PLUGIN, plugin); + ex.stuffException(st); } - type = "USER"; } void WriterImplementation::setPlugin(const char* m) @@ -91,20 +98,34 @@ result.insertBytes(sequence++, current.getBuffer(), current.getBufferLength()); } -void WriterImplementation::setType(const char* value) +void WriterImplementation::setType(Firebird::IStatus* st, const char* value) { - if (value) - type = value; + try + { + if (value) + type = value; + } + catch(const Firebird::Exception& ex) + { + ex.stuffException(st); + } } -void WriterImplementation::setDb(const char* value) +void WriterImplementation::setDb(Firebird::IStatus* st, const char* value) { - if (value) + try { - PathName target; - expandDatabaseName(value, target, NULL); - current.insertPath(AuthReader::AUTH_SECURE_DB, target); + if (value) + { + PathName target; + expandDatabaseName(value, target, NULL); + current.insertPath(AuthReader::AUTH_SECURE_DB, target); + } } + catch(const Firebird::Exception& ex) + { + ex.stuffException(st); + } } } // namespace Auth Modified: firebird/trunk/src/common/Auth.h =================================================================== --- firebird/trunk/src/common/Auth.h 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/common/Auth.h 2014-07-02 12:57:12 UTC (rev 59811) @@ -49,9 +49,9 @@ // IWriter implementation void FB_CARG reset(); - void FB_CARG add(const char* name); - void FB_CARG setType(const char* value); - void FB_CARG setDb(const char* value); + void FB_CARG add(Firebird::IStatus* st, const char* name); + void FB_CARG setType(Firebird::IStatus* st, const char* value); + void FB_CARG setDb(Firebird::IStatus* st, const char* value); private: Firebird::ClumpletWriter current, result; Modified: firebird/trunk/src/common/MsgMetadata.cpp =================================================================== --- firebird/trunk/src/common/MsgMetadata.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/common/MsgMetadata.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -270,15 +270,7 @@ } } -void check(IStatus* status) -{ - if (!status->isSuccess()) - { - status_exception::raise(status->get()); - } -} - // Add an item based on a descriptor. void MsgMetadata::addItem(const MetaName& name, bool nullable, const dsc& desc) { Modified: firebird/trunk/src/common/call_service.cpp =================================================================== --- firebird/trunk/src/common/call_service.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/common/call_service.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -328,13 +328,15 @@ } -static void setAttr(Auth::UserData* u) +static void setAttr(IStatus* status, Auth::UserData* u) { string attr; setAttr(attr, "Uid", &u->u); setAttr(attr, "Gid", &u->g); - u->attributes()->setEntered(attr.hasData()); - u->attributes()->set(attr.c_str()); + u->attributes()->set(status, attr.c_str()); + if (!status->isSuccess()) + return; + u->attributes()->setEntered(status, attr.hasData()); } @@ -472,8 +474,11 @@ if (uData.user.get()[0] && callback) { - setAttr(&uData); - callback->list(&uData); + LocalStatus status; + setAttr(&status, &uData); + check(&status); + callback->list(&status, &uData); + check(&status); } } else @@ -554,14 +559,20 @@ p += sizeof(USHORT); f.set(p, len); - f.setEntered(1); p += len; + + LocalStatus s; + f.setEntered(&s, 1); + check(&s); } static void parseLong(const char*& p, Auth::IntField& f, size_t& loop) { - f.set(isc_vax_integer(p, sizeof(ULONG))); - f.setEntered(1); + LocalStatus s; + f.set(&s, isc_vax_integer(p, sizeof(ULONG))); + check(&s); + f.setEntered(&s, 1); + check(&s); const size_t len2 = sizeof(ULONG) + 1; if (len2 > loop) @@ -639,12 +650,16 @@ case isc_spb_sec_username: if (uData.user.get()[0]) { + LocalStatus status; if (callback) { - setAttr(&uData); - callback->list(&uData); + setAttr(&status, &uData); + check(&status); + callback->list(&status, &uData); + check(&status); } - uData.clear(); + uData.clear(&status); + check(&status); } parseString2(p, uData.user, loop); break; Modified: firebird/trunk/src/common/classes/GetPlugins.h =================================================================== --- firebird/trunk/src/common/classes/GetPlugins.h 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/common/classes/GetPlugins.h 2014-07-02 12:57:12 UTC (rev 59811) @@ -49,13 +49,8 @@ pluginSet.assignRefNoIncr(pluginInterface->getPlugins(&status, interfaceType, (namesList ? namesList : Config::getDefaultConfig()->getPlugins(interfaceType)), desiredVersion, ui, NULL)); + check(&status); - if (!pluginSet) - { - fb_assert(!status.isSuccess()); - status_exception::raise(status.get()); - } - getPlugin(); } @@ -68,13 +63,8 @@ pluginSet.assignRefNoIncr(pluginInterface->getPlugins(&status, interfaceType, (namesList ? namesList : knownConfig->getPlugins(interfaceType)), desiredVersion, ui, new FirebirdConf(knownConfig))); + check(&status); - if (!pluginSet) - { - fb_assert(!status.isSuccess()); - status_exception::raise(status.get()); - } - getPlugin(); } @@ -104,7 +94,10 @@ { pluginInterface->releasePlugin(currentPlugin); currentPlugin = NULL; - pluginSet->next(); + + LocalStatus status; + pluginSet->next(&status); + check(&status); getPlugin(); } } @@ -116,7 +109,10 @@ pluginInterface->releasePlugin(currentPlugin); currentPlugin = NULL; } - pluginSet->set(newName); + + LocalStatus status; + pluginSet->set(&status, newName); + check(&status); getPlugin(); } @@ -137,7 +133,9 @@ void getPlugin() { - currentPlugin = (P*) pluginSet->getPlugin(); + LocalStatus status; + currentPlugin = (P*) pluginSet->getPlugin(&status); + check(&status); } }; Modified: firebird/trunk/src/common/classes/ImplementHelper.h =================================================================== --- firebird/trunk/src/common/classes/ImplementHelper.h 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/common/classes/ImplementHelper.h 2014-07-02 12:57:12 UTC (rev 59811) @@ -145,11 +145,19 @@ class SimpleFactoryBase : public AutoIface<IPluginFactory, FB_PLUGIN_FACTORY_VERSION> { public: - IPluginBase* FB_CARG createPlugin(IPluginConfig* factoryParameter) + IPluginBase* FB_CARG createPlugin(IStatus* status, IPluginConfig* factoryParameter) { - P* p = new P(factoryParameter); - p->addRef(); - return p; + try + { + P* p = new P(factoryParameter); + p->addRef(); + return p; + } + catch(const Firebird::Exception& ex) + { + ex.stuffException(status); + } + return NULL; } }; @@ -357,6 +365,16 @@ }; +// Generic status checker +inline void check(IStatus* status) +{ + if (!status->isSuccess()) + { + status_exception::raise(status->get()); + } +} + + // debugger for reference counters #ifdef DEV_BUILD Modified: firebird/trunk/src/common/classes/fb_string.cpp =================================================================== --- firebird/trunk/src/common/classes/fb_string.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/common/classes/fb_string.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -129,7 +129,7 @@ memset(stringBuffer, c, sizeL); } - void AbstractString::adjustRange(const size_type length, size_type& pos, size_type& n) + void AbstractString::adjustRange(const size_type length, size_type& pos, size_type& n) throw() { if (pos == npos) { pos = length > n ? length - n : 0; @@ -174,7 +174,7 @@ return stringBuffer + p0; } - void AbstractString::baseErase(size_type p0, size_type n) + void AbstractString::baseErase(size_type p0, size_type n) throw() { adjustRange(length(), p0, n); memmove(stringBuffer + p0, stringBuffer + p0 + n, stringLength - (p0 + n) + 1); Modified: firebird/trunk/src/common/classes/fb_string.h =================================================================== --- firebird/trunk/src/common/classes/fb_string.h 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/common/classes/fb_string.h 2014-07-02 12:57:12 UTC (rev 59811) @@ -151,7 +151,7 @@ stringBuffer[stringLength] = 0; } - void shrinkBuffer() + void shrinkBuffer() throw() { // Shrink buffer if we decide it is beneficial } @@ -200,7 +200,7 @@ } // Trim the range making sure that it fits inside specified length - static void adjustRange(const size_type length, size_type& pos, size_type& n); + static void adjustRange(const size_type length, size_type& pos, size_type& n) throw(); pointer baseAssign(const size_type n); @@ -208,7 +208,7 @@ pointer baseInsert(const size_type p0, const size_type n); - void baseErase(size_type p0, size_type n); + void baseErase(size_type p0, size_type n) throw(); enum TrimType {TrimLeft, TrimRight, TrimBoth}; @@ -511,17 +511,17 @@ insert(it - c_str(), first, last - first); } - AbstractString& erase(size_type p0 = 0, size_type n = npos) + AbstractString& erase(size_type p0 = 0, size_type n = npos) throw() { baseErase(p0, n); return *this; } - iterator erase(iterator it) + iterator erase(iterator it) throw() { erase(it - c_str(), 1); return it; } - iterator erase(iterator first, iterator last) + iterator erase(iterator first, iterator last) throw() { erase(first - c_str(), last - first); return first; Modified: firebird/trunk/src/common/security.cpp =================================================================== --- firebird/trunk/src/common/security.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/common/security.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -52,7 +52,7 @@ } } -void FB_CARG UserData::clear() +void FB_CARG UserData::clear(Firebird::IStatus*) { op = 0; Modified: firebird/trunk/src/common/security.h =================================================================== --- firebird/trunk/src/common/security.h 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/common/security.h 2014-07-02 12:57:12 UTC (rev 59811) @@ -49,7 +49,7 @@ return s; } - void FB_CARG setEntered(int newValue) + void FB_CARG setEntered(Firebird::IStatus*, int newValue) { e = newValue; } @@ -68,20 +68,27 @@ return value.c_str(); } - void FB_CARG set(const char* newValue) + void FB_CARG set(Firebird::IStatus* status, const char* newValue) { - value = newValue ? newValue : ""; + try + { + value = newValue ? newValue : ""; + } + catch(const Firebird::Exception& ex) + { + ex.stuffException(status); + } } - void FB_CARG set(const char* newValue, size_t len) + void set(const char* newValue, size_t len) { value.assign(newValue, len); } - void clear() + void clear() throw() { e = s = 0; - value = ""; + value.erase(); // should not call allocation function - no throw } private: @@ -107,7 +114,7 @@ return s; } - void FB_CARG setEntered(int newValue) + void FB_CARG setEntered(Firebird::IStatus*, int newValue) { e = newValue; } @@ -126,12 +133,12 @@ return value; } - void FB_CARG set(int newValue) + void FB_CARG set(Firebird::IStatus*, int newValue) { value = newValue; } - void clear() + void clear() throw() { e = s = 0; value = 0; @@ -200,7 +207,7 @@ return &act; } - void FB_CARG clear(); + void FB_CARG clear(Firebird::IStatus* status); typedef Firebird::Array<UCHAR> AuthenticationBlock; Modified: firebird/trunk/src/dsql/DdlNodes.epp =================================================================== --- firebird/trunk/src/dsql/DdlNodes.epp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/dsql/DdlNodes.epp 2014-07-02 12:57:12 UTC (rev 59811) @@ -9736,6 +9736,29 @@ name.c_str()); } + +static void setCharField(Auth::CharField& field, const string* value) +{ + if (value) + { + LocalStatus s; + if (value->hasData()) + { + field.set(&s, value->c_str()); + check(&s); + field.setEntered(&s, 1); + check(&s); + } + else + { + field.setEntered(&s, 0); + check(&s); + field.setSpecified(1); + } + } +} + + void CreateAlterUserNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { if (mode != USER_ADD && !password && !firstName && !middleName && !lastName && @@ -9764,10 +9787,14 @@ } text.upper(); + Firebird::LocalStatus s; + userData->op = mode == USER_ADD ? Auth::ADD_OPER : mode == USER_MOD ? Auth::MOD_OPER : Auth::ADDMOD_OPER; - userData->user.set(text.c_str()); - userData->user.setEntered(1); + userData->user.set(&s, text.c_str()); + check(&s); + userData->user.setEntered(&s, 1); + check(&s); if (password) { @@ -9777,76 +9804,28 @@ status_exception::raise(Arg::PrivateDyn(250)); } - userData->pass.set(password->c_str()); - userData->pass.setEntered(1); + setCharField(userData->pass, password); } - if (firstName) - { - if (firstName->hasData()) - { - userData->first.set(firstName->c_str()); - userData->first.setEntered(1); - } - else - { - userData->first.setEntered(0); - userData->first.setSpecified(1); - } - } + setCharField(userData->first, firstName); + setCharField(userData->middle, middleName); + setCharField(userData->last, lastName); + setCharField(userData->com, comment); - if (middleName) - { - if (middleName->hasData()) - { - userData->middle.set(middleName->c_str()); - userData->middle.setEntered(1); - } - else - { - userData->middle.setEntered(0); - userData->middle.setSpecified(1); - } - } - - if (lastName) - { - if (lastName->hasData()) - { - userData->last.set(lastName->c_str()); - userData->last.setEntered(1); - } - else - { - userData->last.setEntered(0); - userData->last.setSpecified(1); - } - } - - if (comment) - { - if (comment->hasData()) - { - userData->com.set(comment->c_str()); - userData->com.setEntered(1); - } - else - { - userData->com.setEntered(0); - userData->com.setSpecified(1); - } - } - if (adminRole.specified) { - userData->adm.set(adminRole.value); - userData->adm.setEntered(1); + userData->adm.set(&s, adminRole.value); + check(&s); + userData->adm.setEntered(&s, 1); + check(&s); } if (active.specified) { - userData->act.set((int) active.value); - userData->act.setEntered(1); + userData->act.set(&s, (int) active.value); + check(&s); + userData->act.setEntered(&s, 1); + check(&s); } string attributesBuffer; @@ -9863,8 +9842,10 @@ if (attributesBuffer.hasData()) { - userData->attr.set(attributesBuffer.c_str()); - userData->attr.setEntered(1); + userData->attr.set(&s, attributesBuffer.c_str()); + check(&s); + userData->attr.setEntered(&s, 1); + check(&s); } const int ddlAction = mode == USER_ADD ? DDL_TRIGGER_CREATE_USER : DDL_TRIGGER_ALTER_USER; @@ -9901,9 +9882,11 @@ string text = name.c_str(); text.upper(); + Firebird::LocalStatus s; userData->op = Auth::DEL_OPER; - userData->user.set(text.c_str()); - userData->user.setEntered(1); + userData->user.set(&s, text.c_str()); + userData->user.setEntered(&s, 1); + check(&s); executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_DROP_USER, userData->user.get()); Modified: firebird/trunk/src/dsql/dsql.cpp =================================================================== --- firebird/trunk/src/dsql/dsql.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/dsql/dsql.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -90,7 +90,7 @@ static void sql_info(thread_db*, dsql_req*, ULONG, const UCHAR*, ULONG, UCHAR*); static UCHAR* var_info(const dsql_msg*, const UCHAR*, const UCHAR* const, UCHAR*, const UCHAR* const, USHORT, bool); -static void check(IStatus*); +static void checkD(IStatus*); static inline bool reqTypeWithCursor(DsqlCompiledStatement::Type type) { @@ -1286,7 +1286,7 @@ LocalStatus st; unsigned count = meta->getCount(&st); - check(&st); + checkD(&st); if (count != parameters.getCount()) { @@ -1303,9 +1303,9 @@ for (USHORT index = 0; index < count; index++) { unsigned sqlType = meta->getType(&st, index); - check(&st); + checkD(&st); unsigned sqlLength = meta->getLength(&st, index); - check(&st); + checkD(&st); dsc desc; desc.dsc_flags = 0; @@ -1317,11 +1317,11 @@ desc.dsc_length = dlength; desc.dsc_scale = meta->getScale(&st, index); - check(&st); + checkD(&st); desc.dsc_sub_type = meta->getSubType(&st, index); - check(&st); + checkD(&st); unsigned textType = meta->getCharSet(&st, index); - check(&st); + checkD(&st); desc.setTextType(textType); desc.dsc_address = (UCHAR*)(IPTR) dataOffset; @@ -1357,7 +1357,7 @@ // raise error if one present -static void check(IStatus* st) +static void checkD(IStatus* st) { if (!st->isSuccess()) { Modified: firebird/trunk/src/include/firebird/Auth.h =================================================================== --- firebird/trunk/src/include/firebird/Auth.h 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/include/firebird/Auth.h 2014-07-02 12:57:12 UTC (rev 59811) @@ -46,9 +46,9 @@ { public: virtual void FB_CARG reset() = 0; - virtual void FB_CARG add(const char* name) = 0; - virtual void FB_CARG setType(const char* value) = 0; - virtual void FB_CARG setDb(const char* value) = 0; + virtual void FB_CARG add(Firebird::IStatus* status, const char* name) = 0; + virtual void FB_CARG setType(Firebird::IStatus* status, const char* value) = 0; + virtual void FB_CARG setDb(Firebird::IStatus* status, const char* value) = 0; }; #define FB_AUTH_WRITER_VERSION (FB_VERSIONED_VERSION + 4) @@ -96,7 +96,7 @@ public: virtual int FB_CARG entered() = 0; virtual int FB_CARG specified() = 0; - virtual void FB_CARG setEntered(int newValue) = 0; + virtual void FB_CARG setEntered(Firebird::IStatus* status, int newValue) = 0; }; #define FB_AUTH_FIELD_VERSION (FB_VERSIONED_VERSION + 3) @@ -104,7 +104,7 @@ { public: virtual const char* FB_CARG get() = 0; - virtual void FB_CARG set(const char* newValue) = 0; + virtual void FB_CARG set(Firebird::IStatus* status, const char* newValue) = 0; }; #define FB_AUTH_CHAR_FIELD_VERSION (FB_AUTH_FIELD_VERSION + 2) @@ -112,7 +112,7 @@ { public: virtual int FB_CARG get() = 0; - virtual void FB_CARG set(int newValue) = 0; + virtual void FB_CARG set(Firebird::IStatus* status, int newValue) = 0; }; #define FB_AUTH_INT_FIELD_VERSION (FB_AUTH_FIELD_VERSION + 2) @@ -134,14 +134,14 @@ virtual IIntUserField* FB_CARG admin() = 0; - virtual void FB_CARG clear() = 0; + virtual void FB_CARG clear(Firebird::IStatus* status) = 0; }; #define FB_AUTH_USER_VERSION (FB_VERSIONED_VERSION + 11) class IListUsers : public Firebird::IVersioned { public: - virtual void FB_CARG list(IUser* user) = 0; + virtual void FB_CARG list(Firebird::IStatus* status, IUser* user) = 0; }; #define FB_AUTH_LIST_USERS_VERSION (FB_VERSIONED_VERSION + 1) Modified: firebird/trunk/src/include/firebird/Plugin.h =================================================================== --- firebird/trunk/src/include/firebird/Plugin.h 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/include/firebird/Plugin.h 2014-07-02 12:57:12 UTC (rev 59811) @@ -90,9 +90,9 @@ public: virtual const char* FB_CARG getName() const = 0; virtual const char* FB_CARG getModuleName() const = 0; - virtual IPluginBase* FB_CARG getPlugin() = 0; - virtual void FB_CARG next() = 0; - virtual void FB_CARG set(const char*) = 0; + virtual IPluginBase* FB_CARG getPlugin(IStatus* status) = 0; + virtual void FB_CARG next(IStatus* status) = 0; + virtual void FB_CARG set(IStatus* status, const char*) = 0; }; #define FB_PLUGIN_SET_VERSION (FB_REFCOUNTED_VERSION + 5) @@ -105,9 +105,9 @@ public: virtual const char* FB_CARG getName() = 0; virtual const char* FB_CARG getValue() = 0; - virtual IConfig* FB_CARG getSubConfig() = 0; virtual ISC_INT64 FB_CARG getIntValue() = 0; virtual FB_BOOLEAN FB_CARG getBoolValue() = 0; + virtual IConfig* FB_CARG getSubConfig(IStatus* status) = 0; }; #define FB_CONFIG_PARAMETER_VERSION (FB_REFCOUNTED_VERSION + 5) @@ -115,9 +115,9 @@ class IConfig : public IRefCounted { public: - virtual IConfigEntry* FB_CARG find(const char* name) = 0; - virtual IConfigEntry* FB_CARG findValue(const char* name, const char* value) = 0; - virtual IConfigEntry* FB_CARG findPos(const char* name, unsigned int pos) = 0; + virtual IConfigEntry* FB_CARG find(IStatus* status, const char* name) = 0; + virtual IConfigEntry* FB_CARG findValue(IStatus* status, const char* name, const char* value) = 0; + virtual IConfigEntry* FB_CARG findPos(IStatus* status, const char* name, unsigned int pos) = 0; }; #define FB_CONFIG_VERSION (FB_REFCOUNTED_VERSION + 3) @@ -144,9 +144,9 @@ { public: virtual const char* FB_CARG getConfigFileName() = 0; - virtual IConfig* FB_CARG getDefaultConfig() = 0; - virtual IFirebirdConf* FB_CARG getFirebirdConf() = 0; - virtual void FB_CARG setReleaseDelay(ISC_UINT64 microSeconds) = 0; + virtual IConfig* FB_CARG getDefaultConfig(IStatus* status) = 0; + virtual IFirebirdConf* FB_CARG getFirebirdConf(IStatus* status) = 0; + virtual void FB_CARG setReleaseDelay(IStatus* status, ISC_UINT64 microSeconds) = 0; }; #define FB_PLUGIN_CONFIG_VERSION (FB_REFCOUNTED_VERSION + 4) @@ -154,7 +154,7 @@ class IPluginFactory : public IVersioned { public: - virtual IPluginBase* FB_CARG createPlugin(IPluginConfig* factoryParameter) = 0; + virtual IPluginBase* FB_CARG createPlugin(IStatus* status, IPluginConfig* factoryParameter) = 0; }; #define FB_PLUGIN_FACTORY_VERSION (FB_VERSIONED_VERSION + 1) @@ -195,7 +195,7 @@ const char* namesList, int desiredVersion, UpgradeInfo* ui, IFirebirdConf* firebirdConf) = 0; // Get generic config interface for given file - virtual IConfig* FB_CARG getConfig(const char* filename) = 0; + virtual IConfig* FB_CARG getConfig(IStatus* status, const char* filename) = 0; // Plugins must be released using this function - use of plugin's release() // will cause resources leak virtual void FB_CARG releasePlugin(IPluginBase* plugin) = 0; @@ -216,20 +216,18 @@ typedef void PluginEntrypoint(IMaster* masterInterface); namespace PluginType { - static const unsigned int YValve = 1; - static const unsigned int Provider = 2; - // leave space for may be some more super-std plugins - static const unsigned int FirstNonLibPlugin = 11; - static const unsigned int AuthServer = 11; - static const unsigned int AuthClient = 12; - static const unsigned int AuthUserManagement = 13; - static const unsigned int ExternalEngine = 14; - static const unsigned int Trace = 15; - static const unsigned int WireCrypt = 16; - static const unsigned int DbCrypt = 17; - static const unsigned int KeyHolder = 18; + static const unsigned int Provider = 1; + static const unsigned int FirstNonLibPlugin = 2; + static const unsigned int AuthServer = 3; + static const unsigned int AuthClient = 4; + static const unsigned int AuthUserManagement = 5; + static const unsigned int ExternalEngine = 6; + static const unsigned int Trace = 7; + static const unsigned int WireCrypt = 8; + static const unsigned int DbCrypt = 9; + static const unsigned int KeyHolder = 10; - static const unsigned int MaxType = 19; // keep in sync please + static const unsigned int MaxType = 11; // keep in sync please } Modified: firebird/trunk/src/include/firebird/Provider.h =================================================================== --- firebird/trunk/src/include/firebird/Provider.h 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/include/firebird/Provider.h 2014-07-02 12:57:12 UTC (rev 59811) @@ -41,6 +41,8 @@ class IEventCallback : public IRefCounted { public: + // eventCallbackFunction is missing error status cause it's always called from places + // where an ability to report an error to the user is missing virtual void FB_CARG eventCallbackFunction(unsigned int length, const unsigned char* events) = 0; }; #define FB_EVENT_CALLBACK_VERSION (FB_REFCOUNTED_VERSION + 1) Modified: firebird/trunk/src/include/firebird/Timer.h =================================================================== --- firebird/trunk/src/include/firebird/Timer.h 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/include/firebird/Timer.h 2014-07-02 12:57:12 UTC (rev 59811) @@ -49,9 +49,9 @@ { public: // Set timer - virtual void FB_CARG start(ITimer* timer, TimerDelay microSeconds) = 0; + virtual void FB_CARG start(IStatus* status, ITimer* timer, TimerDelay microSeconds) = 0; // Stop timer - virtual void FB_CARG stop(ITimer* timer) = 0; + virtual void FB_CARG stop(IStatus* status, ITimer* timer) = 0; }; #define FB_TIMER_CONTROL_VERSION (FB_VERSIONED_VERSION + 2) Modified: firebird/trunk/src/include/firebird/Utl.h =================================================================== --- firebird/trunk/src/include/firebird/Utl.h 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/include/firebird/Utl.h 2014-07-02 12:57:12 UTC (rev 59811) @@ -36,7 +36,7 @@ class IVersionCallback : public IVersioned { public: - virtual void FB_CARG callback(const char* text) = 0; + virtual void FB_CARG callback(IStatus* status, const char* text) = 0; }; #define FB_VERSION_CALLBACK_VERSION (FB_VERSIONED_VERSION + 1) Modified: firebird/trunk/src/isql/show.epp =================================================================== --- firebird/trunk/src/isql/show.epp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/isql/show.epp 2014-07-02 12:57:12 UTC (rev 59811) @@ -125,7 +125,7 @@ { public: // IVersionCallback implementation - void FB_CARG callback(const char* text) + void FB_CARG callback(Firebird::IStatus*, const char* text) { isqlGlob.printf("%s%s", text, NEWLINE); } Modified: firebird/trunk/src/jrd/Database.cpp =================================================================== --- firebird/trunk/src/jrd/Database.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/jrd/Database.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -339,16 +339,20 @@ { if (active) { - TimerInterfacePtr()->stop(this); - active = false; + Firebird::LocalStatus s; + TimerInterfacePtr()->stop(&s, this); + if (s.isSuccess()) + active = false; } } void Database::Linger::set(unsigned seconds) { - if (dbb) + if (dbb && !active) { - TimerInterfacePtr()->start(this, seconds * 1000 * 1000); + Firebird::LocalStatus s; + TimerInterfacePtr()->start(&s, this, seconds * 1000 * 1000); + check(&s); active = true; } } Modified: firebird/trunk/src/jrd/UserManagement.cpp =================================================================== --- firebird/trunk/src/jrd/UserManagement.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/jrd/UserManagement.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -217,8 +217,10 @@ { Auth::StackUserData cmd; cmd.op = Auth::DIS_OPER; - cmd.user.set(command->userName()->get()); - cmd.user.setEntered(1); + cmd.user.set(&status, command->userName()->get()); + check(&status); + cmd.user.setEntered(&status, 1); + check(&status); class OldAttributes : public Firebird::AutoIface<Auth::IListUsers, FB_AUTH_LIST_USERS_VERSION> { @@ -228,10 +230,17 @@ { } // IListUsers implementation - void FB_CARG list(Auth::IUser* data) + void FB_CARG list(IStatus* status, Auth::IUser* data) { - value = data->attributes()->entered() ? data->attributes()->get() : ""; - present = true; + try + { + value = data->attributes()->entered() ? data->attributes()->get() : ""; + present = true; + } + catch(const Firebird::Exception& ex) + { + ex.stuffException(status); + } } string value; @@ -305,13 +314,16 @@ if (merged.hasData()) { - command->attr.set(merged.c_str()); + command->attr.set(&status, merged.c_str()); + check(&status); } else { - command->attr.setEntered(0); + command->attr.setEntered(&status, 0); + check(&status); command->attr.setSpecified(1); - command->attr.set(""); + command->attr.set(&status, ""); + check(&status); } } } @@ -320,8 +332,10 @@ { if (!command->act.entered()) { - command->act.set(1); - command->act.setEntered(1); + command->act.set(&status, 1); + check(&status); + command->act.setEntered(&status, 1); + check(&status); } } @@ -447,10 +461,17 @@ { } // IListUsers implementation - void FB_CARG list(Auth::IUser* user) + void FB_CARG list(IStatus* status, Auth::IUser* user) { - MasterInterfacePtr()->upgradeInterface(user, FB_AUTH_USER_VERSION, upInfo); - userManagement->list(user); + try + { + MasterInterfacePtr()->upgradeInterface(user, FB_AUTH_USER_VERSION, upInfo); + userManagement->list(user); + } + catch(const Firebird::Exception& ex) + { + ex.stuffException(status); + } } private: Modified: firebird/trunk/src/jrd/jrd.cpp =================================================================== --- firebird/trunk/src/jrd/jrd.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/jrd/jrd.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -371,16 +371,24 @@ { public: // IPluginFactory implementation - IPluginBase* FB_CARG createPlugin(IPluginConfig* factoryParameter) + IPluginBase* FB_CARG createPlugin(IStatus* status, IPluginConfig* factoryParameter) { - if (myModule->unloadStarted()) + try { - return NULL; + if (myModule->unloadStarted()) + { + Arg::Gds(isc_shutdown).raise(); + } + + IPluginBase* p = new JProvider(factoryParameter); + p->addRef(); + return p; } - - IPluginBase* p = new JProvider(factoryParameter); - p->addRef(); - return p; + catch(const Firebird::Exception& ex) + { + ex.stuffException(status); + } + return NULL; } }; @@ -6405,7 +6413,9 @@ ++maxLinger; // avoid rounding errors time_t t = time(NULL); - dbb->dbb_plugin_config->setReleaseDelay(maxLinger > t ? (maxLinger - t) * 1000 * 1000 : 0); + LocalStatus s; + dbb->dbb_plugin_config->setReleaseDelay(&s, maxLinger > t ? (maxLinger - t) * 1000 * 1000 : 0); + check(&s); } Modified: firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp =================================================================== --- firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -581,18 +581,24 @@ void FB_CARG ConfigStorage::TouchFile::handler() { os_utils::touchFile(fileName); - TimerInterfacePtr()->start(this, TOUCH_INTERVAL * 1000 * 1000); + LocalStatus s; + TimerInterfacePtr()->start(&s, this, TOUCH_INTERVAL * 1000 * 1000); + // ignore error in handler } void ConfigStorage::TouchFile::start(const char* fName) { fileName = fName; - TimerInterfacePtr()->start(this, TOUCH_INTERVAL * 1000 * 1000); + LocalStatus s; + TimerInterfacePtr()->start(&s, this, TOUCH_INTERVAL * 1000 * 1000); + check(&s); } void ConfigStorage::TouchFile::stop() { - TimerInterfacePtr()->stop(this); + LocalStatus s; + TimerInterfacePtr()->stop(&s, this); + // ignore error in stop timer } int FB_CARG ConfigStorage::TouchFile::release() Modified: firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp =================================================================== --- firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -86,7 +86,9 @@ procedures(getPool()), triggers(getPool()) { - RefPtr<IConfig> defaultConfig(REF_NO_INCR, par->getDefaultConfig()); + LocalStatus s; + RefPtr<IConfig> defaultConfig(REF_NO_INCR, par->getDefaultConfig(&s)); + check(&s); if (defaultConfig) { @@ -95,10 +97,11 @@ RefPtr<IConfigEntry> icp; - for (int n = 0; icp.assignRefNoIncr(defaultConfig->findPos("path", n)); ++n) + for (int n = 0; icp.assignRefNoIncr(defaultConfig->findPos(&s, "path", n)); ++n) { + check(&s); + PathName newPath(icp->getValue()); - bool found = false; for (ObjectsArray<PathName>::iterator i = paths->begin(); i != paths->end(); ++i) Modified: firebird/trunk/src/remote/client/BlrFromMessage.cpp =================================================================== --- firebird/trunk/src/remote/client/BlrFromMessage.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/remote/client/BlrFromMessage.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -33,19 +33,6 @@ using namespace Firebird; -namespace -{ - -void checkStatus(IStatus* st) -{ - if (!st->isSuccess()) - { - status_exception::raise(st->get()); - } -} - -} - namespace Remote { @@ -79,7 +66,7 @@ LocalStatus st; expectedMessageLength = metadata->getMessageLength(&st); - checkStatus(&st); + check(&st); getBlrData().clear(); @@ -100,15 +87,15 @@ for (unsigned i = 0; i < count; ++i) { unsigned dtype = metadata->getType(&st, i) & ~1; - checkStatus(&st); + check(&st); unsigned len = metadata->getLength(&st, i); - checkStatus(&st); + check(&st); int scale = metadata->getScale(&st, i); - checkStatus(&st); + check(&st); unsigned charSet = metadata->getCharSet(&st, i); - checkStatus(&st); + check(&st); int subType = metadata->getSubType(&st, i); - checkStatus(&st); + check(&st); switch (dtype) { Modified: firebird/trunk/src/utilities/gsec/gsec.cpp =================================================================== --- firebird/trunk/src/utilities/gsec/gsec.cpp 2014-07-02 12:19:10 UTC (rev 59810) +++ firebird/trunk/src/utilities/gsec/gsec.cpp 2014-07-02 12:57:12 UTC (rev 59811) @@ -139,8 +139,11 @@ return; if (from->entered()) { - to->set(from->get()); - to->setEntered(1); + Firebird::LocalStatus s; + to->set(&s, from->get()); + check(&s); + to->setEntered(&s, 1); + check(&s); } } @@ -223,7 +226,9 @@ { serverName = ""; } - user_data->database.set(databaseName.c_str()); + Firebird::LocalStatus s; + user_data->database.set(&s, databaseName.c_str()); + check(&s); Firebird::RefPtr<IManagement> manager; ISC_STATUS_ARRAY status; @@ -398,8 +403,11 @@ const Parameter* p = findParameter(name); if (p) { - field->set(p->asInteger()); - field->setEntered(1); + Firebird::LocalStatus s; + field->set(&s, p->asInteger()); + check(&s); + field->setEntered(&s, 1); + check(&s); } } }; @@ -412,45 +420,52 @@ { } // IListUsers implementation - void FB_CARG list(IUser* data) + void FB_CARG list(Firebird::IStatus* status, IUser* data) { - Attributes attr(data); - - if (data->active()->entered() && data->active()->get() == 0) + try { - // skip inactive users - return; - } + Attributes attr(data); - if (tdsec->utilSvc->isService()) - { - tdsec->utilSvc->putLine(isc_spb_sec_username, data->userName()->get()); - tdsec->utilSvc->putLine(isc_spb_sec_firstname, data->firstName()->entered() ? data->firstName()->get() : ""); - tdsec->utilSvc->putLine(isc_spb_sec_middlename, data->middleName()->entered() ? data->middleName()->get() : ""); - tdsec->utilSvc->putLine(isc_spb_sec_lastname, data->lastName()->entered() ? data->lastName()->get() : ""); - tdsec->utilSvc->putSLong(isc_spb_sec_userid, attr["uid"]); - tdsec->utilSvc->putSLong(isc_spb_sec_groupid, attr["gid"]); - if (data->operation() == DIS_OPER) + if (data->active()->entered() && data->active()->get() == 0) { - tdsec->utilSvc->putSLong(isc_spb_sec_admin, data->admin()->get()); + // skip inactive users + return; } - } - else - { - if (first) + + if (tdsec->utilSvc->isService()) { - GSEC_message(GsecMsg26); - GSEC_message(GsecMsg27); - // msg26: " user name uid gid admin full name" - // msg27: "-------------------------------------------------------------------------------------------------" - first = false; + tdsec->utilSvc->putLine(isc_spb_sec_username, data->userName()->get()); + tdsec->utilSvc->putLine(isc_spb_sec_firstname, data->firstName()->entered() ? data->firstName()->get() : ""); + tdsec->utilSvc->putLine(isc_spb_sec_middlename, data->middleName()->entered() ? data->middleName()->get() : ""); + tdsec->utilSvc->putLine(isc_spb_sec_lastname, data->lastName()->entered() ? data->lastName()->get() : ""); + tdsec->utilSvc->putSLong(isc_spb_sec_userid, attr["uid"]); + tdsec->utilSvc->putSLong(isc_spb_sec_groupid, attr["gid"]); + if (data->operation() == DIS_OPER) + { + tdsec->utilSvc->putSLong(isc_spb_sec_admin, data->admin()->get()); + } } + else + { + if (first) + { + GSEC_message(GsecMsg26); + GSEC_message(GsecMsg27); + // msg26: " user name uid gid admin full name" + // msg27: "-------------------------------------------------------------------------------------------------" + first = false; + } - util_output(false, "%-*.*s %5d %5d %-5.5s %s %s %s\n", - USERNAME_LENGTH, USERNAME_LENGTH, data->userName()->get(), - attr["uid"], attr["gid"], data->admin()->get() ? "admin" : "", - data->firstName()->get(), data->middleName()->get(), data->lastName()->get()); + util_output(false, "%-*.*s %5d %5d %-5.5s %s %s %s\n", + USERNAME_LENGTH, USERNAME_LENGTH, data->userName()->get(), + attr["uid"], attr["gid"], data->admin()->get() ? "admin" : "", + data->firstName()->get(), data->middleName()->get(), data->lastName()->get()); + } } + catch(const Firebird::Exception& ex) + { + ex.stuffException(status); + } } private: @@ -467,12 +482,19 @@ { } // IListUsers implementation - void FB_CARG list(IUser* data) + void FB_CARG list(Firebird::IStatus* status, IUser* data) { - Attributes attr(data); + try + { + Attributes attr(data); - attr.set(&u->u, "uid"); - attr.set(&u->g, "gid"); + attr.set(&u->u, "uid"); + attr.set(&u->g, "gid"); + } + catch(const Firebird::Exception& ex) + { + ex.stuffException(status); + } } private: @@ -498,8 +520,10 @@ if (user_data->operation() == ADD_OPER) { - user_data->act.set(1); - user_data->act.setEntered(1); + user_data->act.set(&s, 1); + check(&s); + user_data->act.setEntered(&s, 1); + check(&s); } if (user_data->operation() == MOD_OPER && user_data->userName()->entered() && @@ -507,8 +531,10 @@ { StackUserData u; u.op = OLD_DIS_OPER; - u.user.set(user_data->userName()->get()); - u.user.setEntered(1); + u.user.set(&s, user_data->userName()->get()); + check(&s); + u.user.setEntered(&s, 1); + check(&s); Callback cb(&u); ret = manager->execute(&st, &u, &cb); @@ -539,8 +565,8 @@ setAttr(attr, "uid", &user_data->u); setAttr(attr, "gid", &user_data->g); setAttr(attr, "groupName", &user_data->group); - user_data->attributes()->set(attr.c_str()); - user_data->attributes()->setEntered(attr.hasData() ? 1 : 0); + user_data->attributes()->set(&s, attr.c_str()); + user_data->attributes()->setEntered(&s, attr.hasData() ? 1 : 0); ret = manager->execute(&st, user_data, &disp); @@ -581,7 +607,8 @@ { MOVE_CLEAR(status, sizeof(ISC_STATUS_ARRAY)); // Clear out user data each time through this loop. - user_data->clear(); + user_data->... [truncated message content] |
From: <fir...@us...> - 2014-07-03 00:28:09
|
Revision: 59814 http://sourceforge.net/p/firebird/code/59814 Author: firebirds Date: 2014-07-03 00:28:01 +0000 (Thu, 03 Jul 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-07-02 19:19:05 UTC (rev 59813) +++ firebird/trunk/ChangeLog 2014-07-03 00:28:01 UTC (rev 59814) @@ -1,3 +1,59 @@ + 2014-07-02 19:19 dimitr + M src/burp/restore.epp +Fixed CORE-4480: ISQL issues warning: "Bad debug info format" when connect to database with stored function after it's restoring. + + 2014-07-02 12:57 alexpeshkoff + M examples/dbcrypt/CryptKeyHolder.cpp + M examples/dbcrypt/DbCrypt.cpp + M src/auth/AuthDbg.cpp + M src/auth/SecureRemotePassword/manage/SrpManagement.cpp + M src/auth/SecureRemotePassword/server/SrpServer.cpp + M src/auth/SecurityDatabase/LegacyManagement.epp + M src/auth/SecurityDatabase/LegacyServer.cpp + M src/common/Auth.cpp + M src/common/Auth.h + M src/common/MsgMetadata.cpp + M src/common/call_service.cpp + M src/common/classes/GetPlugins.h + M src/common/classes/ImplementHelper.h + M src/common/classes/fb_string.cpp + M src/common/classes/fb_string.h + M src/common/security.cpp + M src/common/security.h + M src/dsql/DdlNodes.epp + M src/dsql/dsql.cpp + M src/include/firebird/Auth.h + M src/include/firebird/Plugin.h + M src/include/firebird/Provider.h + M src/include/firebird/Timer.h + M src/include/firebird/Utl.h + M src/isql/show.epp + M src/jrd/Database.cpp + M src/jrd/UserManagement.cpp + M src/jrd/jrd.cpp + M src/jrd/trace/TraceConfigStorage.cpp + M src/plugins/udr_engine/UdrEngine.cpp + M src/remote/client/BlrFromMessage.cpp + M src/utilities/gsec/gsec.cpp + M src/yvalve/MasterImplementation.cpp + M src/yvalve/PluginManager.cpp + M src/yvalve/PluginManager.h + M src/yvalve/alt.cpp + M src/yvalve/utl.cpp + M src/yvalve/why.cpp +Added first parameter IStatus* to a lot of functions in API interfaces + + 2014-07-02 07:59 fsg + M src/isql/extract.epp + M src/isql/isql.h + M src/jrd/obj.h +corrections as suggested by Adriano and Claudio + + 2014-07-02 02:22 asfernandes + M src/common/isc_proto.h + M src/isql/extract.epp +Misc. + 2014-07-01 08:23 alexpeshkoff M src/jrd/types.h Fixed CORE-4477: Field RDB$MAP_TO_TYPE is not present in RDB$TYPES Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-07-02 19:19:05 UTC (rev 59813) +++ firebird/trunk/src/jrd/build_no.h 2014-07-03 00:28:01 UTC (rev 59814) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31204 + FORMAL BUILD NUMBER:31208 */ -#define PRODUCT_VER_STRING "3.0.0.31204" -#define FILE_VER_STRING "WI-T3.0.0.31204" -#define LICENSE_VER_STRING "WI-T3.0.0.31204" -#define FILE_VER_NUMBER 3, 0, 0, 31204 +#define PRODUCT_VER_STRING "3.0.0.31208" +#define FILE_VER_STRING "WI-T3.0.0.31208" +#define LICENSE_VER_STRING "WI-T3.0.0.31208" +#define FILE_VER_NUMBER 3, 0, 0, 31208 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31204" +#define FB_BUILD_NO "31208" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-07-02 19:19:05 UTC (rev 59813) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-07-03 00:28:01 UTC (rev 59814) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31204 +BuildNum=31208 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2014-07-03 07:54:52
|
Revision: 59816 http://sourceforge.net/p/firebird/code/59816 Author: alexpeshkoff Date: 2014-07-03 07:54:48 +0000 (Thu, 03 Jul 2014) Log Message: ----------- Frontported fix for linux build regression Modified Paths: -------------- firebird/trunk/configure.ac firebird/trunk/src/jrd/os/posix/unix.cpp Modified: firebird/trunk/configure.ac =================================================================== --- firebird/trunk/configure.ac 2014-07-03 07:48:17 UTC (rev 59815) +++ firebird/trunk/configure.ac 2014-07-03 07:54:48 UTC (rev 59816) @@ -833,6 +833,9 @@ AC_CHECK_FUNCS(pthread_cancel) AC_CHECK_FUNCS(sigset) +dnl Check for fallocate() system call +AC_CHECK_FUNCS(fallocate) + dnl Semaphores if test "$ac_cv_header_semaphore_h" = "yes"; then AC_SEARCH_LIBS(sem_init, rt pthread) Modified: firebird/trunk/src/jrd/os/posix/unix.cpp =================================================================== --- firebird/trunk/src/jrd/os/posix/unix.cpp 2014-07-03 07:48:17 UTC (rev 59815) +++ firebird/trunk/src/jrd/os/posix/unix.cpp 2014-07-03 07:54:48 UTC (rev 59816) @@ -307,7 +307,7 @@ * **************************************/ -#ifdef HAVE_LINUX_FALLOC_H +#if defined(HAVE_LINUX_FALLOC_H) && defined(HAVE_FALLOCATE) ULONG leftPages = extPages; for (jrd_file* file = main_file; file && leftPages; file = file->fil_next) { @@ -354,7 +354,7 @@ } #else main_file->fil_flags |= FIL_no_fast_extend; -#endif // HAVE_LINUX_FALLOC_H +#endif // fallocate present // not implemented return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-07-04 00:35:43
|
Revision: 59820 http://sourceforge.net/p/firebird/code/59820 Author: firebirds Date: 2014-07-04 00:35:34 +0000 (Fri, 04 Jul 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-07-03 09:43:41 UTC (rev 59819) +++ firebird/trunk/ChangeLog 2014-07-04 00:35:34 UTC (rev 59820) @@ -1,3 +1,16 @@ + 2014-07-03 09:43 alexpeshkoff + M src/auth/SecureRemotePassword/manage/SrpManagement.cpp +Fixed management for users with ' (single quote) in a name + + 2014-07-03 09:37 alexpeshkoff + M src/yvalve/why.cpp +Added missing check for provider status before creating yvalve objects + + 2014-07-03 07:54 alexpeshkoff + M configure.ac + M src/jrd/os/posix/unix.cpp +Frontported fix for linux build regression + 2014-07-02 19:19 dimitr M src/burp/restore.epp Fixed CORE-4480: ISQL issues warning: "Bad debug info format" when connect to database with stored function after it's restoring. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-07-03 09:43:41 UTC (rev 59819) +++ firebird/trunk/src/jrd/build_no.h 2014-07-04 00:35:34 UTC (rev 59820) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31208 + FORMAL BUILD NUMBER:31211 */ -#define PRODUCT_VER_STRING "3.0.0.31208" -#define FILE_VER_STRING "WI-T3.0.0.31208" -#define LICENSE_VER_STRING "WI-T3.0.0.31208" -#define FILE_VER_NUMBER 3, 0, 0, 31208 +#define PRODUCT_VER_STRING "3.0.0.31211" +#define FILE_VER_STRING "WI-T3.0.0.31211" +#define LICENSE_VER_STRING "WI-T3.0.0.31211" +#define FILE_VER_NUMBER 3, 0, 0, 31211 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31208" +#define FB_BUILD_NO "31211" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-07-03 09:43:41 UTC (rev 59819) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-07-04 00:35:34 UTC (rev 59820) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31208 +BuildNum=31211 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2014-07-04 08:25:58
|
Revision: 59822 http://sourceforge.net/p/firebird/code/59822 Author: alexpeshkoff Date: 2014-07-04 08:25:49 +0000 (Fri, 04 Jul 2014) Log Message: ----------- Fixed CORE-4478: Failure to load provider/plugin not reported Modified Paths: -------------- firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/common/config/config.cpp firebird/trunk/src/include/gen/codetext.h firebird/trunk/src/include/gen/iberror.h firebird/trunk/src/include/gen/msgs.h firebird/trunk/src/include/gen/sql_code.h firebird/trunk/src/include/gen/sql_state.h firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql firebird/trunk/src/yvalve/PluginManager.cpp Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2014-07-04 00:50:22 UTC (rev 59821) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2014-07-04 08:25:49 UTC (rev 59822) @@ -1418,16 +1418,16 @@ PARAMETER (GDS__attachment_in_use = 335545002) INTEGER*4 GDS__transaction_in_use PARAMETER (GDS__transaction_in_use = 335545003) - INTEGER*4 GDS__pman_plugin_notfound - PARAMETER (GDS__pman_plugin_notfound = 335545004) INTEGER*4 GDS__pman_cannot_load_plugin - PARAMETER (GDS__pman_cannot_load_plugin = 335545005) + PARAMETER (GDS__pman_cannot_load_plugin = 335545004) + INTEGER*4 GDS__pman_module_notfound + PARAMETER (GDS__pman_module_notfound = 335545005) INTEGER*4 GDS__pman_entrypoint_notfound PARAMETER (GDS__pman_entrypoint_notfound = 335545006) - INTEGER*4 GDS__pman_bad_conf_index - PARAMETER (GDS__pman_bad_conf_index = 335545007) - INTEGER*4 GDS__pman_unknown_instance - PARAMETER (GDS__pman_unknown_instance = 335545008) + INTEGER*4 GDS__pman_module_bad + PARAMETER (GDS__pman_module_bad = 335545007) + INTEGER*4 GDS__pman_plugin_notfound + PARAMETER (GDS__pman_plugin_notfound = 335545008) INTEGER*4 GDS__sysf_invalid_trig_namespace PARAMETER (GDS__sysf_invalid_trig_namespace = 335545009) INTEGER*4 GDS__unexpected_null Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2014-07-04 00:50:22 UTC (rev 59821) +++ firebird/trunk/lang_helpers/gds_codes.pas 2014-07-04 08:25:49 UTC (rev 59822) @@ -716,11 +716,11 @@ gds_eem_engine_notfound = 335545001; gds_attachment_in_use = 335545002; gds_transaction_in_use = 335545003; - gds_pman_plugin_notfound = 335545004; - gds_pman_cannot_load_plugin = 335545005; + gds_pman_cannot_load_plugin = 335545004; + gds_pman_module_notfound = 335545005; gds_pman_entrypoint_notfound = 335545006; - gds_pman_bad_conf_index = 335545007; - gds_pman_unknown_instance = 335545008; + gds_pman_module_bad = 335545007; + gds_pman_plugin_notfound = 335545008; gds_sysf_invalid_trig_namespace = 335545009; gds_unexpected_null = 335545010; gds_type_notcompat_blob = 335545011; Modified: firebird/trunk/src/common/config/config.cpp =================================================================== --- firebird/trunk/src/common/config/config.cpp 2014-07-04 00:50:22 UTC (rev 59821) +++ firebird/trunk/src/common/config/config.cpp 2014-07-04 08:25:49 UTC (rev 59822) @@ -184,7 +184,11 @@ {TYPE_INTEGER, "FileSystemCacheSize", (ConfigValue) 0}, // percent {TYPE_STRING, "Providers", (ConfigValue) "Remote, " CURRENT_ENGINE ", Loopback"}, {TYPE_STRING, "AuthServer", (ConfigValue) "Srp"}, +#ifdef WIN_NT {TYPE_STRING, "AuthClient", (ConfigValue) "Srp, Win_Sspi, Legacy_Auth"}, +#else + {TYPE_STRING, "AuthClient", (ConfigValue) "Srp, Legacy_Auth"}, +#endif {TYPE_STRING, "UserManager", (ConfigValue) "Srp"}, {TYPE_STRING, "TracePlugin", (ConfigValue) "fbtrace"}, {TYPE_STRING, "SecurityDatabase", (ConfigValue) "$(root)/security3.fdb"}, // security database name Modified: firebird/trunk/src/include/gen/codetext.h =================================================================== --- firebird/trunk/src/include/gen/codetext.h 2014-07-04 00:50:22 UTC (rev 59821) +++ firebird/trunk/src/include/gen/codetext.h 2014-07-04 08:25:49 UTC (rev 59822) @@ -705,11 +705,11 @@ {"eem_engine_notfound", 335545001}, {"attachment_in_use", 335545002}, {"transaction_in_use", 335545003}, - {"pman_plugin_notfound", 335545004}, - {"pman_cannot_load_plugin", 335545005}, + {"pman_cannot_load_plugin", 335545004}, + {"pman_module_notfound", 335545005}, {"pman_entrypoint_notfound", 335545006}, - {"pman_bad_conf_index", 335545007}, - {"pman_unknown_instance", 335545008}, + {"pman_module_bad", 335545007}, + {"pman_plugin_notfound", 335545008}, {"sysf_invalid_trig_namespace", 335545009}, {"unexpected_null", 335545010}, {"type_notcompat_blob", 335545011}, Modified: firebird/trunk/src/include/gen/iberror.h =================================================================== --- firebird/trunk/src/include/gen/iberror.h 2014-07-04 00:50:22 UTC (rev 59821) +++ firebird/trunk/src/include/gen/iberror.h 2014-07-04 08:25:49 UTC (rev 59822) @@ -739,11 +739,11 @@ const ISC_STATUS isc_eem_engine_notfound = 335545001L; const ISC_STATUS isc_attachment_in_use = 335545002L; const ISC_STATUS isc_transaction_in_use = 335545003L; -const ISC_STATUS isc_pman_plugin_notfound = 335545004L; -const ISC_STATUS isc_pman_cannot_load_plugin = 335545005L; +const ISC_STATUS isc_pman_cannot_load_plugin = 335545004L; +const ISC_STATUS isc_pman_module_notfound = 335545005L; const ISC_STATUS isc_pman_entrypoint_notfound = 335545006L; -const ISC_STATUS isc_pman_bad_conf_index = 335545007L; -const ISC_STATUS isc_pman_unknown_instance = 335545008L; +const ISC_STATUS isc_pman_module_bad = 335545007L; +const ISC_STATUS isc_pman_plugin_notfound = 335545008L; const ISC_STATUS isc_sysf_invalid_trig_namespace = 335545009L; const ISC_STATUS isc_unexpected_null = 335545010L; const ISC_STATUS isc_type_notcompat_blob = 335545011L; @@ -1996,11 +1996,11 @@ #define isc_eem_engine_notfound 335545001L #define isc_attachment_in_use 335545002L #define isc_transaction_in_use 335545003L -#define isc_pman_plugin_notfound 335545004L -#define isc_pman_cannot_load_plugin 335545005L +#define isc_pman_cannot_load_plugin 335545004L +#define isc_pman_module_notfound 335545005L #define isc_pman_entrypoint_notfound 335545006L -#define isc_pman_bad_conf_index 335545007L -#define isc_pman_unknown_instance 335545008L +#define isc_pman_module_bad 335545007L +#define isc_pman_plugin_notfound 335545008L #define isc_sysf_invalid_trig_namespace 335545009L #define isc_unexpected_null 335545010L #define isc_type_notcompat_blob 335545011L Modified: firebird/trunk/src/include/gen/msgs.h =================================================================== --- firebird/trunk/src/include/gen/msgs.h 2014-07-04 00:50:22 UTC (rev 59821) +++ firebird/trunk/src/include/gen/msgs.h 2014-07-04 08:25:49 UTC (rev 59822) @@ -708,11 +708,11 @@ {335545001, "External engine @1 not found"}, /* eem_engine_notfound */ {335545002, "Attachment is in use"}, /* attachment_in_use */ {335545003, "Transaction is in use"}, /* transaction_in_use */ - {335545004, "Plugin @1 not found"}, /* pman_plugin_notfound */ - {335545005, "Module @1 exists, but can not be loaded"}, /* pman_cannot_load_plugin */ - {335545006, "Entrypoint of plugin @1 does not exist"}, /* pman_entrypoint_notfound */ - {335545007, "Invalid value @1 for parameter index at PluginImpl::getConfigInfo: out of bounds"}, /* pman_bad_conf_index */ - {335545008, "Plugin @1 does not create @2 instances"}, /* pman_unknown_instance */ + {335545004, "Error loading plugin @1"}, /* pman_cannot_load_plugin */ + {335545005, "Loadable module @1 not found"}, /* pman_module_notfound */ + {335545006, "Standard plugin entrypoint does not exist in module @1"}, /* pman_entrypoint_notfound */ + {335545007, "Module @1 exists but can not be loaded"}, /* pman_module_bad */ + {335545008, "Module @1 does not contain plugin @2 type @3"}, /* pman_plugin_notfound */ {335545009, "Invalid usage of context namespace DDL_TRIGGER"}, /* sysf_invalid_trig_namespace */ {335545010, "Value is NULL but isNull parameter was not informed"}, /* unexpected_null */ {335545011, "Type @1 is incompatible with BLOB"}, /* type_notcompat_blob */ Modified: firebird/trunk/src/include/gen/sql_code.h =================================================================== --- firebird/trunk/src/include/gen/sql_code.h 2014-07-04 00:50:22 UTC (rev 59821) +++ firebird/trunk/src/include/gen/sql_code.h 2014-07-04 08:25:49 UTC (rev 59822) @@ -704,11 +704,11 @@ {335545001, -901}, /* 681 eem_engine_notfound */ {335545002, -532}, /* 682 attachment_in_use */ {335545003, -532}, /* 683 transaction_in_use */ - {335545004, -901}, /* 684 pman_plugin_notfound */ - {335545005, -901}, /* 685 pman_cannot_load_plugin */ + {335545004, -901}, /* 684 pman_cannot_load_plugin */ + {335545005, -901}, /* 685 pman_module_notfound */ {335545006, -901}, /* 686 pman_entrypoint_notfound */ - {335545007, -901}, /* 687 pman_bad_conf_index */ - {335545008, -901}, /* 688 pman_unknown_instance */ + {335545007, -901}, /* 687 pman_module_bad */ + {335545008, -901}, /* 688 pman_plugin_notfound */ {335545009, -833}, /* 689 sysf_invalid_trig_namespace */ {335545010, -901}, /* 690 unexpected_null */ {335545011, -901}, /* 691 type_notcompat_blob */ Modified: firebird/trunk/src/include/gen/sql_state.h =================================================================== --- firebird/trunk/src/include/gen/sql_state.h 2014-07-04 00:50:22 UTC (rev 59821) +++ firebird/trunk/src/include/gen/sql_state.h 2014-07-04 08:25:49 UTC (rev 59822) @@ -704,11 +704,11 @@ {335545001, "39000"}, // 681 eem_engine_notfound {335545002, "08002"}, // 682 attachment_in_use {335545003, "25S02"}, // 683 transaction_in_use - {335545004, "39000"}, // 684 pman_plugin_notfound - {335545005, "39000"}, // 685 pman_cannot_load_plugin - {335545006, "39000"}, // 686 pman_entrypoint_notfound - {335545007, "39000"}, // 687 pman_bad_conf_index - {335545008, "39000"}, // 688 pman_unknown_instance + {335545004, "39000"}, // 684 pman_cannot_load_plugin + {335545005, "00000"}, // 685 pman_module_notfound + {335545006, "00000"}, // 686 pman_entrypoint_notfound + {335545007, "00000"}, // 687 pman_module_bad + {335545008, "00000"}, // 688 pman_plugin_notfound {335545009, "42000"}, // 689 sysf_invalid_trig_namespace {335545010, "22002"}, // 690 unexpected_null {335545011, "2200G"}, // 691 type_notcompat_blob Modified: firebird/trunk/src/msgs/messages2.sql =================================================================== --- firebird/trunk/src/msgs/messages2.sql 2014-07-04 00:50:22 UTC (rev 59821) +++ firebird/trunk/src/msgs/messages2.sql 2014-07-04 08:25:49 UTC (rev 59822) @@ -791,11 +791,11 @@ ('eem_engine_notfound', 'getEngine', 'ExtEngineManager.cpp', NULL, 0, 681, NULL, 'External engine @1 not found', NULL, NULL) ('attachment_in_use', 'GDS_DETACH/GDS_DROP_DATABASE', 'jrd.cpp', NULL, 0, 682, NULL, 'Attachment is in use', NULL, NULL) ('transaction_in_use', 'commit/prepare/rollback', 'jrd.cpp', NULL, 0, 683, NULL, 'Transaction is in use', NULL, NULL) -('pman_plugin_notfound', 'PluginManager::getPlugin', 'PluginManager.cpp', NULL, 0, 684, NULL, 'Plugin @1 not found', NULL, NULL) -('pman_cannot_load_plugin', 'PluginManager::getPlugin', 'PluginManager.cpp', NULL, 0, 685, NULL, 'Module @1 exists, but can not be loaded', NULL, NULL) -('pman_entrypoint_notfound', 'PluginManager::getPlugin', 'PluginManager.cpp', NULL, 0, 686, NULL, 'Entrypoint of plugin @1 does not exist', NULL, NULL) -('pman_bad_conf_index', 'PluginImpl::getConfigInfo', 'PluginManager.cpp', NULL, 0, 687, NULL, 'Invalid value @1 for parameter index at PluginImpl::getConfigInfo: out of bounds', NULL, NULL) -('pman_unknown_instance', 'PluginImpl::getExternalEngineFactory', 'PluginManager.cpp', NULL, 0, 688, NULL, 'Plugin @1 does not create @2 instances', NULL, NULL) +('pman_cannot_load_plugin', 'PluginManager::getPlugin', 'PluginManager.cpp', NULL, 0, 684, NULL, 'Error loading plugin @1', NULL, NULL) +('pman_module_notfound', 'PluginManager::getPlugin', 'PluginManager.cpp', NULL, 0, 685, NULL, 'Loadable module @1 not found', NULL, NULL) +('pman_entrypoint_notfound', 'PluginManager::getPlugin', 'PluginManager.cpp', NULL, 0, 686, NULL, 'Standard plugin entrypoint does not exist in module @1', NULL, NULL) +('pman_module_bad', 'PluginImpl::getConfigInfo', 'PluginManager.cpp', NULL, 0, 687, NULL, 'Module @1 exists but can not be loaded', NULL, NULL) +('pman_plugin_notfound', 'PluginImpl::getExternalEngineFactory', 'PluginManager.cpp', NULL, 0, 688, NULL, 'Module @1 does not contain plugin @2 type @3', NULL, NULL) ('sysf_invalid_trig_namespace', 'evlGetContext', 'SysFunction.cpp', NULL, 0, 689, NULL, 'Invalid usage of context namespace DDL_TRIGGER', NULL, NULL) ('unexpected_null', 'ValueMover::getValue', 'ValueImpl.cpp', NULL, 0, 690, NULL, 'Value is NULL but isNull parameter was not informed', NULL, NULL) ('type_notcompat_blob', 'ValueImpl::getBlobId', 'ValueImpl.cpp', NULL, 0, 691, NULL, 'Type @1 is incompatible with BLOB', NULL, NULL) Modified: firebird/trunk/src/msgs/system_errors2.sql =================================================================== --- firebird/trunk/src/msgs/system_errors2.sql 2014-07-04 00:50:22 UTC (rev 59821) +++ firebird/trunk/src/msgs/system_errors2.sql 2014-07-04 08:25:49 UTC (rev 59822) @@ -689,11 +689,11 @@ (-901, '39', '000', 0, 681, 'eem_engine_notfound', NULL, NULL) (-532, '08', '002', 0, 682, 'attachment_in_use', NULL, NULL) (-532, '25', 'S02', 0, 683, 'transaction_in_use', NULL, NULL) -(-901, '39', '000', 0, 684, 'pman_plugin_notfound', NULL, NULL) -(-901, '39', '000', 0, 685, 'pman_cannot_load_plugin', NULL, NULL) -(-901, '39', '000', 0, 686, 'pman_entrypoint_notfound', NULL, NULL) -(-901, '39', '000', 0, 687, 'pman_bad_conf_index', NULL, NULL) -(-901, '39', '000', 0, 688, 'pman_unknown_instance', NULL, NULL) +(-901, '39', '000', 0, 684, 'pman_cannot_load_plugin', NULL, NULL) +(-901, '00', '000', 0, 685, 'pman_module_notfound', NULL, NULL) +(-901, '00', '000', 0, 686, 'pman_entrypoint_notfound', NULL, NULL) +(-901, '00', '000', 0, 687, 'pman_module_bad', NULL, NULL) +(-901, '00', '000', 0, 688, 'pman_plugin_notfound', NULL, NULL) (-833, '42', '000', 0, 689, 'sysf_invalid_trig_namespace', NULL, NULL) (-901, '22', '002', 0, 690, 'unexpected_null', NULL, NULL) (-901, '22', '00G', 0, 691, 'type_notcompat_blob', NULL, NULL) Modified: firebird/trunk/src/yvalve/PluginManager.cpp =================================================================== --- firebird/trunk/src/yvalve/PluginManager.cpp 2014-07-04 00:50:22 UTC (rev 59821) +++ firebird/trunk/src/yvalve/PluginManager.cpp 2014-07-04 08:25:49 UTC (rev 59822) @@ -127,41 +127,6 @@ return RefPtr<ConfigFile>(NULL); } - struct PluginLoadInfo - { - PathName curModule, regName, plugConfigFile; - RefPtr<ConfigFile> conf; - - PluginLoadInfo(const char* pluginName) - { - // define default values for plugin ... - curModule = fb_utils::getPrefix(Firebird::DirType::FB_DIR_PLUGINS, pluginName); - regName = pluginName; - - // and try to load them from conf file - conf = findConfig("Plugin", pluginName); - - if (conf.hasData()) - { - const ConfigFile::Parameter* v = conf->findParameter("RegisterName"); - if (v) - { - regName = v->value.ToPathName(); - } - - v = conf->findParameter("Module"); - if (v) - { - curModule = v->value.ToPathName(); - } - } - - plugConfigFile = curModule; - changeExtension(plugConfigFile, "conf"); - } - }; - - bool flShutdown = false; class ConfigParameterAccess FB_FINAL : public RefCntIface<IConfigEntry, FB_CONFIG_PARAMETER_VERSION> @@ -771,6 +736,49 @@ return 1; } + struct PluginLoadInfo + { + PathName curModule, regName, plugConfigFile; + RefPtr<ConfigFile> conf; + bool required; + + PluginLoadInfo(const char* pluginName) + { + // define default values for plugin ... + curModule = fb_utils::getPrefix(Firebird::DirType::FB_DIR_PLUGINS, pluginName); + regName = pluginName; + required = false; + + // and try to load them from conf file + conf = findConfig("Plugin", pluginName); + + if (conf.hasData()) + { + const ConfigFile::Parameter* v = conf->findParameter("RegisterName"); + if (v) + { + regName = v->value.ToPathName(); + } + + v = conf->findParameter("Module"); + if (v) + { + curModule = v->value.ToPathName(); + } + + v = conf->findParameter("Required"); + if (v) + { + required = v->asBoolean(); + } + } + + plugConfigFile = curModule; + changeExtension(plugConfigFile, "conf"); + } + }; + + // Provides access to plugins of given type / name. class PluginSet FB_FINAL : public RefCntIface<IPluginSet, FB_PLUGIN_SET_VERSION> { @@ -841,11 +849,11 @@ RefPtr<IFirebirdConf> firebirdConf; MasterInterfacePtr masterInterface; - RefPtr<PluginModule> loadModule(const PathName& modName); + RefPtr<PluginModule> loadModule(const PluginLoadInfo& info); void loadError(const Arg::StatusVector& error) { - error.raise(); + (Arg::Gds(isc_pman_cannot_load_plugin) << currentName << error).raise(); } }; @@ -882,7 +890,7 @@ RefPtr<PluginModule> m(modules->findModule(info.curModule)); if (!m.hasData() && !flShutdown) { - m = loadModule(info.curModule); + m = loadModule(info); } if (!m.hasData()) { @@ -892,9 +900,8 @@ int r = m->findPlugin(interfaceType, info.regName); if (r < 0) { - gds__log("Misconfigured: module %s does not contain plugin %s type %d", - info.curModule.c_str(), info.regName.c_str(), interfaceType); - continue; + loadError(Arg::Gds(isc_pman_plugin_notfound) << + info.curModule << info.regName << Arg::Num(interfaceType)); } currentPlugin = new ConfiguredPlugin(m, r, info.conf, info.plugConfigFile, currentName); @@ -909,9 +916,9 @@ } } - RefPtr<PluginModule> PluginSet::loadModule(const PathName& asIsModuleName) + RefPtr<PluginModule> PluginSet::loadModule(const PluginLoadInfo& info) { - PathName fixedModuleName(asIsModuleName); + PathName fixedModuleName(info.curModule); ModuleLoader::Module* module = ModuleLoader::loadModule(fixedModuleName); @@ -925,13 +932,17 @@ { if (ModuleLoader::isLoadableModule(fixedModuleName)) { - loadError(Arg::Gds(isc_pman_cannot_load_plugin) << fixedModuleName); + loadError(Arg::Gds(isc_pman_module_bad) << fixedModuleName); } + if (info.required) + { + loadError(Arg::Gds(isc_pman_module_notfound) << fixedModuleName); + } return RefPtr<PluginModule>(NULL); } - RefPtr<PluginModule> rc(new PluginModule(module, asIsModuleName)); + RefPtr<PluginModule> rc(new PluginModule(module, info.curModule)); PluginEntrypoint* startModule; if (module->findSymbol(STRINGIZE(FB_PLUGIN_ENTRY_POINT), startModule)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-07-05 00:35:56
|
Revision: 59825 http://sourceforge.net/p/firebird/code/59825 Author: firebirds Date: 2014-07-05 00:35:48 +0000 (Sat, 05 Jul 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-07-04 15:05:28 UTC (rev 59824) +++ firebird/trunk/ChangeLog 2014-07-05 00:35:48 UTC (rev 59825) @@ -1,3 +1,22 @@ + 2014-07-04 14:43 fsg + M src/isql/extract.epp + M src/isql/isql.h +rename constants used by extract.epp to avoid future naming conflicts + + 2014-07-04 08:25 alexpeshkoff + M lang_helpers/gds_codes.ftn + M lang_helpers/gds_codes.pas + M src/common/config/config.cpp + M src/include/gen/codetext.h + M src/include/gen/iberror.h + M src/include/gen/msgs.h + M src/include/gen/sql_code.h + M src/include/gen/sql_state.h + M src/msgs/messages2.sql + M src/msgs/system_errors2.sql + M src/yvalve/PluginManager.cpp +Fixed CORE-4478: Failure to load provider/plugin not reported + 2014-07-03 09:43 alexpeshkoff M src/auth/SecureRemotePassword/manage/SrpManagement.cpp Fixed management for users with ' (single quote) in a name Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-07-04 15:05:28 UTC (rev 59824) +++ firebird/trunk/src/jrd/build_no.h 2014-07-05 00:35:48 UTC (rev 59825) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31211 + FORMAL BUILD NUMBER:31213 */ -#define PRODUCT_VER_STRING "3.0.0.31211" -#define FILE_VER_STRING "WI-T3.0.0.31211" -#define LICENSE_VER_STRING "WI-T3.0.0.31211" -#define FILE_VER_NUMBER 3, 0, 0, 31211 +#define PRODUCT_VER_STRING "3.0.0.31213" +#define FILE_VER_STRING "WI-T3.0.0.31213" +#define LICENSE_VER_STRING "WI-T3.0.0.31213" +#define FILE_VER_NUMBER 3, 0, 0, 31213 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31211" +#define FB_BUILD_NO "31213" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-07-04 15:05:28 UTC (rev 59824) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-07-05 00:35:48 UTC (rev 59825) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31211 +BuildNum=31213 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-07-06 00:35:57
|
Revision: 59827 http://sourceforge.net/p/firebird/code/59827 Author: firebirds Date: 2014-07-06 00:35:48 +0000 (Sun, 06 Jul 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-07-05 18:36:54 UTC (rev 59826) +++ firebird/trunk/ChangeLog 2014-07-06 00:35:48 UTC (rev 59827) @@ -1,3 +1,14 @@ + 2014-07-05 18:36 asfernandes + M src/jrd/DatabaseSnapshot.cpp + M src/jrd/UserManagement.cpp + M src/jrd/jrd.cpp + M src/jrd/obj.h + M src/utilities/gsec/gsec.cpp + M src/yvalve/MasterImplementation.cpp + M src/yvalve/PluginManager.cpp + M src/yvalve/why.cpp +Misc. + 2014-07-04 14:43 fsg M src/isql/extract.epp M src/isql/isql.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-07-05 18:36:54 UTC (rev 59826) +++ firebird/trunk/src/jrd/build_no.h 2014-07-06 00:35:48 UTC (rev 59827) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31213 + FORMAL BUILD NUMBER:31214 */ -#define PRODUCT_VER_STRING "3.0.0.31213" -#define FILE_VER_STRING "WI-T3.0.0.31213" -#define LICENSE_VER_STRING "WI-T3.0.0.31213" -#define FILE_VER_NUMBER 3, 0, 0, 31213 +#define PRODUCT_VER_STRING "3.0.0.31214" +#define FILE_VER_STRING "WI-T3.0.0.31214" +#define LICENSE_VER_STRING "WI-T3.0.0.31214" +#define FILE_VER_NUMBER 3, 0, 0, 31214 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31213" +#define FB_BUILD_NO "31214" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-07-05 18:36:54 UTC (rev 59826) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-07-06 00:35:48 UTC (rev 59827) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31213 +BuildNum=31214 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-07-07 00:47:33
|
Revision: 59835 http://sourceforge.net/p/firebird/code/59835 Author: firebirds Date: 2014-07-07 00:47:21 +0000 (Mon, 07 Jul 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-07-06 21:15:47 UTC (rev 59834) +++ firebird/trunk/ChangeLog 2014-07-07 00:47:21 UTC (rev 59835) @@ -1,3 +1,12 @@ + 2014-07-06 21:15 hvlad + M src/auth/trusted/AuthSspi.cpp +Fixed Windows build + + 2014-07-06 18:47 asfernandes + M src/isql/extract.epp + M src/isql/isql.h +Get rid of warnings and two set of constants chasing the same "number space". + 2014-07-05 18:36 asfernandes M src/jrd/DatabaseSnapshot.cpp M src/jrd/UserManagement.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-07-06 21:15:47 UTC (rev 59834) +++ firebird/trunk/src/jrd/build_no.h 2014-07-07 00:47:21 UTC (rev 59835) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31214 + FORMAL BUILD NUMBER:31216 */ -#define PRODUCT_VER_STRING "3.0.0.31214" -#define FILE_VER_STRING "WI-T3.0.0.31214" -#define LICENSE_VER_STRING "WI-T3.0.0.31214" -#define FILE_VER_NUMBER 3, 0, 0, 31214 +#define PRODUCT_VER_STRING "3.0.0.31216" +#define FILE_VER_STRING "WI-T3.0.0.31216" +#define LICENSE_VER_STRING "WI-T3.0.0.31216" +#define FILE_VER_NUMBER 3, 0, 0, 31216 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31214" +#define FB_BUILD_NO "31216" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-07-06 21:15:47 UTC (rev 59834) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-07-07 00:47:21 UTC (rev 59835) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31214 +BuildNum=31216 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2014-07-08 07:35:38
|
Revision: 59840 http://sourceforge.net/p/firebird/code/59840 Author: roman-simakov Date: 2014-07-08 07:35:27 +0000 (Tue, 08 Jul 2014) Log Message: ----------- Fixed CORE-735: User rights for metadata changes. We check DDL in DDL nodes and skip at vio level. vio level still exists for direct metadata editing. Modified Paths: -------------- firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/dsql/DdlNodes.epp firebird/trunk/src/dsql/DdlNodes.h firebird/trunk/src/dsql/Nodes.h firebird/trunk/src/dsql/PackageNodes.epp firebird/trunk/src/dsql/PackageNodes.h firebird/trunk/src/dsql/parse.y firebird/trunk/src/include/gen/codetext.h firebird/trunk/src/include/gen/iberror.h firebird/trunk/src/include/gen/ids.h firebird/trunk/src/include/gen/msgs.h firebird/trunk/src/include/gen/sql_code.h firebird/trunk/src/include/gen/sql_state.h firebird/trunk/src/jrd/Database.h firebird/trunk/src/jrd/acl.h firebird/trunk/src/jrd/constants.h firebird/trunk/src/jrd/drq.h firebird/trunk/src/jrd/filters.cpp firebird/trunk/src/jrd/grant.epp firebird/trunk/src/jrd/ini.epp firebird/trunk/src/jrd/intl.h firebird/trunk/src/jrd/jrd.h firebird/trunk/src/jrd/met.epp firebird/trunk/src/jrd/obj.h firebird/trunk/src/jrd/relations.h firebird/trunk/src/jrd/scl.epp firebird/trunk/src/jrd/scl.h firebird/trunk/src/jrd/scl_proto.h firebird/trunk/src/jrd/vio.cpp firebird/trunk/src/msgs/facilities2.sql firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql Added Paths: ----------- firebird/trunk/doc/sql.extensions/README.ddl_access.txt Added: firebird/trunk/doc/sql.extensions/README.ddl_access.txt =================================================================== --- firebird/trunk/doc/sql.extensions/README.ddl_access.txt (rev 0) +++ firebird/trunk/doc/sql.extensions/README.ddl_access.txt 2014-07-08 07:35:27 UTC (rev 59840) @@ -0,0 +1,35 @@ +SQL Language Extension: GRANT/REVOKE permissions on DDL operations + + Implements capability to manage permissions on DDL operations. + +Author: + Red Soft Corporation, roman.simakov(at)red-soft.biz + +Syntax is: + +GRANT CREATE <OBJECT> TO USER|ROLE [with grant option]; +GRANT ALTER ANY <OBJECT> TO USER|ROLE [with grant option]; +GRANT DROP ANY <OBJECT> TO USER|ROLE [with grant option]; + +REVOKE [grant option for] CREATE <OBJECT> FROM USER|ROLE; +REVOKE [grant option for] ALTER ANY <OBJECT> FROM USER|ROLE; +REVOKE [grant option for] DROP ANY <OBJECT> FROM USER|ROLE; + +Where <OBJECT> could be: +TABLE, VIEW, PROCEDURE, FUNCTION, PACKAGE, GENERATOR, SEQUENCE, DOMAIN, +EXCEPTION, ROLE, SHADOW, DATABASE, CHARACTER SET, COLLATION, FILTER + +Description: + +Makes it possible to grant and revoke privileges on DDL operations. + +DDL operations for managing triggers and indices re-use table privileges. + +If ANY keyword is used a user will be able to perform operation on any object. Otherwise only on object which he owns. +If ANY keyword was used due GRANT operation it also must be used in according REVOKE operation. + +Sample: + +GRANT CREATE TABLE TO Joe; +GRANT ALTER ANY TABLE TO Joe; +REVOKE CREATE TABLE FROM Joe; Property changes on: firebird/trunk/doc/sql.extensions/README.ddl_access.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Author Date Id Rev URL \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2014-07-08 07:35:27 UTC (rev 59840) @@ -1598,6 +1598,10 @@ PARAMETER (GDS__cursor_not_positioned = 335545092) INTEGER*4 GDS__dup_attribute PARAMETER (GDS__dup_attribute = 335545093) + INTEGER*4 GDS__dyn_no_priv + PARAMETER (GDS__dyn_no_priv = 335545094) + INTEGER*4 GDS__dsql_cant_grant_option + PARAMETER (GDS__dsql_cant_grant_option = 335545095) INTEGER*4 GDS__gfix_db_name PARAMETER (GDS__gfix_db_name = 335740929) INTEGER*4 GDS__gfix_invalid_sw Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/lang_helpers/gds_codes.pas 2014-07-08 07:35:27 UTC (rev 59840) @@ -806,6 +806,8 @@ gds_set_invalid_role = 335545091; gds_cursor_not_positioned = 335545092; gds_dup_attribute = 335545093; + gds_dyn_no_priv = 335545094; + gds_dsql_cant_grant_option = 335545095; gds_gfix_db_name = 335740929; gds_gfix_invalid_sw = 335740930; gds_gfix_incmp_sw = 335740932; Modified: firebird/trunk/src/dsql/DdlNodes.epp =================================================================== --- firebird/trunk/src/dsql/DdlNodes.epp 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/dsql/DdlNodes.epp 2014-07-08 07:35:27 UTC (rev 59840) @@ -747,7 +747,16 @@ //---------------------- +SecureDdlNodeExecute::SecureDdlNodeExecute(thread_db* tdbb, DdlNode* ddlNode, + DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction): _tdbb(tdbb) +{ + if (ddlNode->checkPermission(tdbb, transaction)) + tdbb->tdbb_flags |= TDBB_trusted_ddl; + ddlNode->execute(tdbb, dsqlScratch, transaction); +} + + // Delete a security class. bool DdlNode::deleteSecurityClass(thread_db* tdbb, jrd_tra* transaction, const MetaName& secClass) @@ -962,6 +971,12 @@ charSet.c_str(), defaultCollation.c_str()); } +bool AlterCharSetNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_charset(tdbb, charSet, SCL_alter); + return true; +} + void AlterCharSetNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -1030,6 +1045,13 @@ objType, objName.c_str(), this->text.c_str()); } +bool CommentOnNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + //DDL_TODO + // Probably requires migration code from execute with caching some query results for reuse in execute later. + return false; +} + // select rdb$relation_name from rdb$relation_fields where rdb$field_name = 'RDB$DESCRIPTION'; // gives the list of objects that accept descriptions. At FB2 time, the only // subobjects with descriptions are relation's fields and procedure's parameters. @@ -1357,6 +1379,17 @@ return DdlNode::dsqlPass(dsqlScratch); } +bool CreateAlterFunctionNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + if (alter) + SCL_check_function(tdbb, &dscName, SCL_alter); + else + SCL_check_create_access(tdbb, SCL_object_function); + return true; +} + void CreateAlterFunctionNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -1975,6 +2008,14 @@ name.c_str(), clauses.name.c_str(), clauses.udfModule.c_str()); } +bool AlterExternalFunctionNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + SCL_check_function(tdbb, &dscName, SCL_alter); + return true; +} + // Allow changing the entry point and/or the module name of a UDF. void AlterExternalFunctionNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) @@ -2092,6 +2133,14 @@ return DdlNode::dsqlPass(dsqlScratch); } +bool DropFunctionNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + SCL_check_function(tdbb, &dscName, SCL_drop); + return true; +} + void DropFunctionNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -2277,6 +2326,17 @@ return DdlNode::dsqlPass(dsqlScratch); } +bool CreateAlterProcedureNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + if (alter) + SCL_check_procedure(tdbb, &dscName, SCL_alter); + else + SCL_check_create_access(tdbb, SCL_object_procedure); + return true; +} + void CreateAlterProcedureNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -2820,6 +2880,14 @@ return DdlNode::dsqlPass(dsqlScratch); } +bool DropProcedureNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + SCL_check_procedure(tdbb, &dscName, SCL_drop); + return true; +} + void DropProcedureNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -3075,6 +3143,14 @@ return DdlNode::dsqlPass(dsqlScratch); } +bool CreateAlterTriggerNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*)relationName.c_str()); + SCL_check_relation(tdbb, &dscName, SCL_alter); + return true; +} + void CreateAlterTriggerNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -3082,9 +3158,6 @@ Attachment* const attachment = transaction->getAttachment(); - if (relationName.isEmpty() && !attachment->locksmith()) - status_exception::raise(Arg::Gds(isc_adm_task_denied)); - source.ltrim("\n\r\t "); // run all statements under savepoint control @@ -3248,6 +3321,32 @@ return DdlNode::dsqlPass(dsqlScratch); } +bool DropTriggerNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + MetaName relationName; + + AutoCacheRequest request(tdbb, drq_l_trigger_relname, DYN_REQUESTS); + + FOR (REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + X IN RDB$TRIGGERS + WITH X.RDB$TRIGGER_NAME EQ name.c_str() + { + relationName = X.RDB$RELATION_NAME; + } + END_FOR + + if (relationName.isEmpty()) + { + // msg 48: "Index not found" + status_exception::raise(Arg::PrivateDyn(48)); + } + + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*)relationName.c_str()); + SCL_check_relation(tdbb, &dscName, SCL_alter); + return true; +} + void DropTriggerNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -3371,6 +3470,12 @@ attributesOn, attributesOff); } +bool CreateCollationNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_create_access(tdbb, SCL_object_collation); + return true; +} + void CreateCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -3583,6 +3688,12 @@ name.c_str()); } +bool DropCollationNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_collation(tdbb, name, SCL_drop); + return true; +} + void DropCollationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -3732,6 +3843,12 @@ " " + nameTypeStr + "\n"; } +bool CreateDomainNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_create_access(tdbb, SCL_object_domain); + return true; +} + void CreateDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -4250,6 +4367,12 @@ " %s\n", name.c_str()); } +bool AlterDomainNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_domain(tdbb, name, SCL_alter); + return true; +} + void AlterDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -4266,6 +4389,7 @@ WITH FLD.RDB$FIELD_NAME EQ name.c_str() { found = true; + executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_ALTER_DOMAIN, name); @@ -4565,6 +4689,12 @@ name.c_str()); } +bool DropDomainNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_domain(tdbb, name, SCL_drop); + return true; +} + void DropDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -4685,6 +4815,15 @@ name.c_str(), create, alter, message.c_str()); } +bool CreateAlterExceptionNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + if (alter) + SCL_check_exception(tdbb, name, SCL_alter); + else + SCL_check_create_access(tdbb, SCL_object_exception); + return true; +} + void CreateAlterExceptionNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -4720,7 +4859,6 @@ { Attachment* const attachment = transaction->getAttachment(); const string& userName = attachment->att_user->usr_user_name; - executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_CREATE_EXCEPTION, name); @@ -4811,6 +4949,12 @@ name.c_str()); } +bool DropExceptionNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_exception(tdbb, name, SCL_drop); + return true; +} + void DropExceptionNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -4869,6 +5013,15 @@ name.c_str()); } +bool CreateAlterSequenceNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + if (alter) + SCL_check_generator(tdbb, name, SCL_alter); + else + SCL_check_create_access(tdbb, SCL_object_generator); + return true; +} + void CreateAlterSequenceNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -5116,6 +5269,12 @@ name.c_str()); } +bool DropSequenceNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_generator(tdbb, name, SCL_drop); + return true; +} + void DropSequenceNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { // run all statements under savepoint control @@ -6552,6 +6711,12 @@ name.c_str()); } +bool CreateRelationNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_create_access(tdbb, SCL_object_table); + return true; +} + void CreateRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -6676,11 +6841,30 @@ name.c_str()); } +bool AlterRelationNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + SCL_check_relation(tdbb, &dscName, SCL_alter); + return true; +} + void AlterRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { saveRelation(tdbb, dsqlScratch, name, false, false); + dsql_rel* relation; + relation = METD_get_relation(dsqlScratch->getTransaction(), dsqlScratch, name); + + if (!relation || (relation && (relation->rel_flags & REL_view))) + { + status_exception::raise( + Arg::Gds(isc_sqlerr) << Arg::Num(-607) << + Arg::Gds(isc_dsql_command_err) << + Arg::Gds(isc_dsql_table_not_found) << name); + } + if (!dsqlScratch->relation) { //// TODO: <Missing arg #1 - possibly status vector overflow> @@ -7353,6 +7537,17 @@ name.c_str()); } +bool DropRelationNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + if (view) + SCL_check_view(tdbb, &dscName, SCL_drop); + else + SCL_check_relation(tdbb, &dscName, SCL_drop); + return true; +} + void DropRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -7587,6 +7782,17 @@ return DdlNode::dsqlPass(dsqlScratch); } +bool CreateAlterViewNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + if (alter) + SCL_check_view(tdbb, &dscName, SCL_alter); + else + SCL_check_create_access(tdbb, SCL_object_view); + return true; +} + void CreateAlterViewNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -7642,7 +7848,6 @@ REL.RDB$VIEW_BLR NOT MISSING { found = true; - MODIFY REL attachment->storeMetaDataBlob(tdbb, transaction, &REL.RDB$VIEW_SOURCE, source); attachment->storeBinaryBlob(tdbb, transaction, &REL.RDB$VIEW_BLR, @@ -8709,6 +8914,15 @@ name.c_str()); } +bool CreateIndexNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + const MetaName &relationName = relation->dsqlName; + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*)relationName.c_str()); + SCL_check_relation(tdbb, &dscName, SCL_alter); + return true; +} + // Define an index. void CreateIndexNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -8768,6 +8982,32 @@ name.c_str(), active); } +bool AlterIndexNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + MetaName relationName; + + AutoCacheRequest request(tdbb, drq_l_index_relname, DYN_REQUESTS); + + FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + IDX IN RDB$INDICES + WITH IDX.RDB$INDEX_NAME EQ name.c_str() + { + relationName = IDX.RDB$RELATION_NAME; + } + END_FOR + + if (relationName.isEmpty()) + { + // msg 48: "Index not found" + status_exception::raise(Arg::PrivateDyn(48)); + } + + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*)relationName.c_str()); + SCL_check_relation(tdbb, &dscName, SCL_alter); + return true; +} + void AlterIndexNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { // run all statements under savepoint control @@ -8814,6 +9054,32 @@ name.c_str()); } +bool SetStatisticsNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + MetaName relationName; + + AutoCacheRequest request(tdbb, drq_l_index_relname, DYN_REQUESTS); + + FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + IDX IN RDB$INDICES + WITH IDX.RDB$INDEX_NAME EQ name.c_str() + { + relationName = IDX.RDB$RELATION_NAME; + } + END_FOR + + if (relationName.isEmpty()) + { + // msg 48: "Index not found" + status_exception::raise(Arg::PrivateDyn(48)); + } + + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*)relationName.c_str()); + SCL_check_relation(tdbb, &dscName, SCL_alter); + return true; +} + void SetStatisticsNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { // run all statements under savepoint control @@ -8879,6 +9145,32 @@ name.c_str()); } +bool DropIndexNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + MetaName relationName; + + AutoCacheRequest request(tdbb, drq_l_index_relname, DYN_REQUESTS); + + FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + IDX IN RDB$INDICES + WITH IDX.RDB$INDEX_NAME EQ name.c_str() + { + relationName = IDX.RDB$RELATION_NAME; + } + END_FOR + + if (relationName.isEmpty()) + { + // msg 48: "Index not found" + status_exception::raise(Arg::PrivateDyn(48)); + } + + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*)relationName.c_str()); + SCL_check_relation(tdbb, &dscName, SCL_alter); + return true; +} + void DropIndexNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { // run all statements under savepoint control @@ -8929,6 +9221,12 @@ name.c_str()); } +bool CreateFilterNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_create_access(tdbb, SCL_object_filter); + return true; +} + // Define a blob filter. void CreateFilterNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsqlScratch*/, jrd_tra* transaction) { @@ -8994,6 +9292,12 @@ name.c_str()); } +bool DropFilterNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_filter(tdbb, name, SCL_drop); + return true; +} + void DropFilterNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsqlScratch*/, jrd_tra* transaction) { // run all statements under savepoint control @@ -9032,11 +9336,14 @@ number); } +bool CreateShadowNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_database(tdbb, SCL_alter); + return true; +} + void CreateShadowNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsqlScratch*/, jrd_tra* transaction) { - if (!tdbb->getAttachment()->locksmith()) - status_exception::raise(Arg::Gds(isc_adm_task_denied)); - // Should be caught by the parser. if (number == 0) { @@ -9097,11 +9404,14 @@ number); } +bool DropShadowNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_database(tdbb, SCL_alter); + return true; +} + void DropShadowNode::execute(thread_db* tdbb, DsqlCompilerScratch* /*dsqlScratch*/, jrd_tra* transaction) { - if (!tdbb->getAttachment()->locksmith()) - status_exception::raise(Arg::Gds(isc_adm_task_denied)); - // run all statements under savepoint control AutoSavePoint savePoint(tdbb, transaction); @@ -9132,6 +9442,12 @@ name.c_str()); } +bool CreateRoleNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_create_access(tdbb, SCL_object_role); + return true; +} + void CreateRoleNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { MetaName ownerName(tdbb->getAttachment()->att_user->usr_user_name); @@ -9269,6 +9585,12 @@ ddl += '"'; } +bool MappingNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + //DDL_TODO + return false; +} + // It's purpose is to add/drop mapping from any security name to DB security object. void MappingNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -9660,6 +9982,12 @@ name.c_str()); } +bool DropRoleNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_role(tdbb, name, SCL_drop); + return true; +} + void DropRoleNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { MetaName user(tdbb->getAttachment()->att_user->usr_user_name); @@ -9678,7 +10006,7 @@ executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_DROP_ROLE, name); - const MetaName roleOwner(ROL.RDB$OWNER_NAME); + if (ROL.RDB$SYSTEM_FLAG != 0) { @@ -9686,29 +10014,22 @@ status_exception::raise(Arg::PrivateDyn(284) << name); } - if (tdbb->getAttachment()->locksmith() || roleOwner == user) - { - AutoCacheRequest request2(tdbb, drq_del_role_1, DYN_REQUESTS); + + AutoCacheRequest request2(tdbb, drq_del_role_1, DYN_REQUESTS); - // The first OR clause finds all members of the role. - // The 2nd OR clause finds all privileges granted to the role - FOR(REQUEST_HANDLE request2 TRANSACTION_HANDLE transaction) - PRIV IN RDB$USER_PRIVILEGES - WITH (PRIV.RDB$RELATION_NAME EQ name.c_str() AND PRIV.RDB$OBJECT_TYPE = obj_sql_role) OR - (PRIV.RDB$USER EQ name.c_str() AND PRIV.RDB$USER_TYPE = obj_sql_role) - { - ERASE PRIV; - } - END_FOR - - ERASE ROL; - } - else + // The first OR clause finds all members of the role. + // The 2nd OR clause finds all privileges granted to the role + FOR(REQUEST_HANDLE request2 TRANSACTION_HANDLE transaction) + PRIV IN RDB$USER_PRIVILEGES + WITH (PRIV.RDB$RELATION_NAME EQ name.c_str() AND PRIV.RDB$OBJECT_TYPE = obj_sql_role) OR + (PRIV.RDB$USER EQ name.c_str() AND PRIV.RDB$USER_TYPE = obj_sql_role) { - // msg 191: "only owner of SQL role or USR_locksmith could drop SQL role" - status_exception::raise(Arg::PrivateDyn(191)); + ERASE PRIV; } + END_FOR + ERASE ROL; + found = true; } END_FOR @@ -9759,6 +10080,13 @@ } +bool CreateAlterUserNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + //DDL_TODO + return false; +} + + void CreateAlterUserNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { if (mode != USER_ADD && !password && !firstName && !middleName && !lastName && @@ -9872,6 +10200,12 @@ name.c_str()); } +bool DropUserNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + //DDL_TODO + return false; +} + void DropUserNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { // run all statements under savepoint control @@ -9912,6 +10246,12 @@ isGrant); } +bool GrantRevokeNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + // GRANT OPTION will be checked in grantRevoke method + return false; +} + void GrantRevokeNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { // run all statements under savepoint control @@ -10033,6 +10373,26 @@ break; } + if (options == 1) { // with grant option + switch (userType) { + case obj_procedure: { + ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("procedures")); + break; + } + case obj_trigger: { + ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("triggers")); + break; + } + case obj_view: { + ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("views")); + break; + } + default: { + break; + } + } + } + MetaName grantorRevoker(grantor ? *grantor : tdbb->getAttachment()->att_user->usr_user_name); @@ -10171,6 +10531,10 @@ tdbb->getAttachment()->att_user->usr_user_name.c_str(), priv, objName, field, true); } + else if (objType >= obj_database) { + checkGrantorCanGrantDdl(tdbb, transaction, + tdbb->getAttachment()->att_user->usr_user_name.c_str(), priv, objName); + } } storePrivilege(tdbb, transaction, objName, user, field, pr, userType, objType, @@ -10506,6 +10870,35 @@ } } +// Check if the grantor has grant option on DDL privilege +void GrantRevokeNode::checkGrantorCanGrantDdl(thread_db* tdbb, jrd_tra* transaction, + const Firebird::MetaName& grantor, const char* privilege, const Firebird::MetaName& objName) +{ + if (tdbb->getAttachment()->locksmith()) + return; + + AutoCacheRequest request(tdbb, drq_l_grant_option, DYN_REQUESTS); + bool grantable = false; + + FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + PRV IN RDB$USER_PRIVILEGES WITH + PRV.RDB$USER = UPPERCASE(grantor.c_str()) AND + PRV.RDB$USER_TYPE = obj_user AND + PRV.RDB$RELATION_NAME EQ objName.c_str() AND + PRV.RDB$OBJECT_TYPE >= obj_database AND + PRV.RDB$PRIVILEGE EQ privilege + { + grantable = PRV.RDB$GRANT_OPTION == 1; + } + END_FOR + + if (!grantable) + { + // no .. privilege with grant option on DDL .. + status_exception::raise(Arg::PrivateDyn(174) << privilege << objName.c_str()); + } +} + void GrantRevokeNode::storePrivilege(thread_db* tdbb, jrd_tra* transaction, const MetaName& object, const MetaName& user, const MetaName& field, const TEXT* privilege, SSHORT userType, SSHORT objType, int option, const MetaName& grantor) @@ -10582,6 +10975,12 @@ "AlterDatabaseNode\n"); } +bool AlterDatabaseNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_database(tdbb, SCL_alter); + return true; +} + void AlterDatabaseNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { Modified: firebird/trunk/src/dsql/DdlNodes.h =================================================================== --- firebird/trunk/src/dsql/DdlNodes.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/dsql/DdlNodes.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -153,6 +153,11 @@ text.printf("RecreateNode\n"); } + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction) + { + return dropNode.checkPermission(tdbb, transaction) && createNode->checkPermission(tdbb, transaction); + } + virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { // run all statements under savepoint control @@ -196,6 +201,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -226,6 +232,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -275,6 +282,7 @@ public: virtual void print(Firebird::string& text) const; virtual DdlNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -334,6 +342,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -366,6 +375,7 @@ public: virtual void print(Firebird::string& text) const; virtual DdlNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -410,6 +420,7 @@ public: virtual void print(Firebird::string& text) const; virtual DdlNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -467,6 +478,7 @@ public: virtual void print(Firebird::string& text) const; virtual DdlNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -551,6 +563,7 @@ public: virtual void print(Firebird::string& text) const; virtual DdlNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -624,6 +637,7 @@ public: virtual void print(Firebird::string& text) const; virtual DdlNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -663,6 +677,7 @@ public: virtual void print(Firebird::string& text) const; virtual DdlNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); void setAttribute(USHORT attribute) @@ -721,6 +736,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -747,6 +763,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -785,6 +802,7 @@ const Firebird::MetaName& newFieldName); virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -822,6 +840,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -853,6 +872,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -889,6 +909,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -940,6 +961,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); virtual DdlNode* dsqlPass(DsqlCompilerScratch* dsqlScratch) @@ -982,6 +1004,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1335,6 +1358,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1362,6 +1386,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1392,6 +1417,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1429,6 +1455,7 @@ public: virtual void print(Firebird::string& text) const; virtual DdlNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1510,6 +1537,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1540,6 +1568,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1565,6 +1594,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1593,6 +1623,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1640,6 +1671,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1668,6 +1700,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1695,6 +1728,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1723,6 +1757,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1747,6 +1782,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1787,6 +1823,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1825,6 +1862,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1857,6 +1895,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1915,6 +1954,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1942,12 +1982,14 @@ object(NULL), users(p), grantAdminOption(false), - grantor(NULL) + grantor(NULL), + isDdl(false) { } public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -1966,6 +2008,8 @@ const Firebird::MetaName& fieldName, bool topLevel); static void checkGrantorCanGrantRole(thread_db* tdbb, jrd_tra* transaction, const Firebird::MetaName& grantor, const Firebird::MetaName& roleName); + static void checkGrantorCanGrantDdl(thread_db* tdbb, jrd_tra* transaction, + const Firebird::MetaName& grantor, const char* privilege, const Firebird::MetaName& objName); static void storePrivilege(thread_db* tdbb, jrd_tra* transaction, const Firebird::MetaName& object, const Firebird::MetaName& user, const Firebird::MetaName& field, const TEXT* privilege, SSHORT userType, @@ -1987,6 +2031,10 @@ case 'G': return "Usage"; case 'M': return "Role"; case 'R': return "Reference"; + //ddl + case 'C': return "Create"; + case 'L': return "Alter"; + case 'O': return "DROP"; } return "<Unknown>"; @@ -2000,6 +2048,8 @@ Firebird::Array<GranteeClause> users; bool grantAdminOption; NestConst<Firebird::MetaName> grantor; + // ddl rights + bool isDdl; }; @@ -2038,6 +2088,7 @@ } virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: Modified: firebird/trunk/src/dsql/Nodes.h =================================================================== --- firebird/trunk/src/dsql/Nodes.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/dsql/Nodes.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -152,6 +152,23 @@ }; +class DdlNode; + +class SecureDdlNodeExecute +{ +public: + explicit SecureDdlNodeExecute(thread_db* tdbb, DdlNode* ddlNode, + DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); + + ~SecureDdlNodeExecute() + { + _tdbb->tdbb_flags &= ~TDBB_trusted_ddl; + } + +private: + thread_db* _tdbb; +}; + class DdlNode : public Node { public: @@ -167,6 +184,11 @@ const Firebird::MetaName& name, int type, const char* privileges); public: + // Check permission on DDL operation. Return true if everything is OK. + // Raise an exception for bad permission. + // If returns false permissions will be check in old style at vio level as well as while direct RDB$ tables modify. + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction) = 0; + // Set the scratch's transaction when executing a node. Fact of accessing the scratch during // execution is a hack. void executeDdl(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) @@ -175,7 +197,7 @@ if (dsqlScratch) dsqlScratch->setTransaction(transaction); - execute(tdbb, dsqlScratch, transaction); + SecureDdlNodeExecute(tdbb, this, dsqlScratch, transaction); } virtual DdlNode* dsqlPass(DsqlCompilerScratch* dsqlScratch) Modified: firebird/trunk/src/dsql/PackageNodes.epp =================================================================== --- firebird/trunk/src/dsql/PackageNodes.epp 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/dsql/PackageNodes.epp 2014-07-08 07:35:27 UTC (rev 59840) @@ -34,6 +34,7 @@ #include "../dsql/pass1_proto.h" #include "../common/StatusArg.h" #include "../jrd/Attachment.h" +#include "../jrd/scl_proto.h" using namespace Firebird; @@ -458,6 +459,18 @@ } +bool CreateAlterPackageNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + if (alter) + SCL_check_package(tdbb, &dscName, SCL_alter); + else + SCL_check_create_access(tdbb, SCL_object_package); + return true; +} + + void CreateAlterPackageNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -619,6 +632,15 @@ } +bool DropPackageNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + SCL_check_package(tdbb, &dscName, SCL_drop); + return true; +} + + void DropPackageNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -838,6 +860,13 @@ } +bool CreatePackageBodyNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + SCL_check_create_access(tdbb, SCL_object_package); + return true; +} + + void CreatePackageBodyNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { @@ -1063,6 +1092,15 @@ } +bool DropPackageBodyNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) +{ + dsc dscName; + dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + SCL_check_package(tdbb, &dscName, SCL_drop); + return true; +} + + void DropPackageBodyNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { Modified: firebird/trunk/src/dsql/PackageNodes.h =================================================================== --- firebird/trunk/src/dsql/PackageNodes.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/dsql/PackageNodes.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -84,6 +84,7 @@ public: virtual DdlNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -126,6 +127,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -160,6 +162,7 @@ public: virtual DdlNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: @@ -191,6 +194,7 @@ public: virtual void print(Firebird::string& text) const; + virtual bool checkPermission(thread_db* tdbb, jrd_tra* transaction); virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); protected: Modified: firebird/trunk/src/dsql/parse.y =================================================================== --- firebird/trunk/src/dsql/parse.y 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/dsql/parse.y 2014-07-08 07:35:27 UTC (rev 59840) @@ -838,6 +838,14 @@ $node->grantAdminOption = $7; $node->grantor = $8; } + | ddl_privileges(NOTRIAL(&$node->privileges)) object + TO non_role_grantee_list(NOTRIAL(&$node->users)) grant_option granted_by + { + $node->object = $2; + $node->grantAdminOption = $5; + $node->grantor = $6; + $node->isDdl = true; + } | role_name_list(NOTRIAL(&$node->roles)) TO role_grantee_list(NOTRIAL(&$node->users)) role_admin_option granted_by { @@ -846,6 +854,39 @@ } ; +%type <granteeClause> object +object : TABLE + { $$ = newNode<GranteeClause>(obj_relations, get_object_name(obj_relations)); } + | VIEW + { $$ = newNode<GranteeClause>(obj_views, get_object_name(obj_views)); } + | PROCEDURE + { $$ = newNode<GranteeClause>(obj_procedures, get_object_name(obj_procedures)); } + | FUNCTION + { $$ = newNode<GranteeClause>(obj_functions, get_object_name(obj_functions)); } + | PACKAGE + { $$ = newNode<GranteeClause>(obj_packages, get_object_name(obj_packages)); } + | GENERATOR + { $$ = newNode<GranteeClause>(obj_generators, get_object_name(obj_generators)); } + | SEQUENCE + { $$ = newNode<GranteeClause>(obj_generators, get_object_name(obj_generators)); } + | KW_DOMAIN + { $$ = newNode<GranteeClause>(obj_domains, get_object_name(obj_domains)); } + | EXCEPTION + { $$ = newNode<GranteeClause>(obj_exceptions, get_object_name(obj_exceptions)); } + | ROLE + { $$ = newNode<GranteeClause>(obj_roles, get_object_name(obj_roles)); } + | SHADOW + { $$ = newNode<GranteeClause>(obj_shadows, get_object_name(obj_shadows)); } + | DATABASE + { $$ = newNode<GranteeClause>(obj_database, get_object_name(obj_database)); } + | CHARACTER SET + { $$ = newNode<GranteeClause>(obj_charsets, get_object_name(obj_charsets)); } + | COLLATION + { $$ = newNode<GranteeClause>(obj_collations, get_object_name(obj_collations)); } + | FILTER + { $$ = newNode<GranteeClause>(obj_filters, get_object_name(obj_filters)); } + ; + table_noise : // nothing | TABLE @@ -872,7 +913,6 @@ %type usage_privilege(<privilegeArray>) usage_privilege($privilegeArray) : USAGE { $privilegeArray->add(PrivilegeClause('G', NULL)); } - ; %type privilege(<privilegeArray>) privilege($privilegeArray) @@ -883,6 +923,26 @@ | REFERENCES column_parens_opt { $privilegeArray->add(PrivilegeClause('R', $2)); } ; +%type ddl_privileges(<privilegeArray>) +ddl_privileges($privilegeArray) + : ALL { $privilegeArray->add(PrivilegeClause('C', NULL)); $privilegeArray->add(PrivilegeClause('L', NULL)); $privilegeArray->add(PrivilegeClause('O', NULL)); } + | ALL PRIVILEGES { $privilegeArray->add(PrivilegeClause('C', NULL)); $privilegeArray->add(PrivilegeClause('L', NULL)); $privilegeArray->add(PrivilegeClause('O', NULL)); } + | ddl_privilege_list($privilegeArray) + ; + +%type ddl_privilege_list(<privilegeArray>) +ddl_privilege_list($privilegeArray) + : ddl_privilege($privilegeArray) + | ddl_privilege_list ',' ddl_privilege($privilegeArray) + ; + +%type ddl_privilege(<privilegeArray>) +ddl_privilege($privilegeArray) + : CREATE { $privilegeArray->add(PrivilegeClause('C', NULL)); } + | ALTER ANY { $privilegeArray->add(PrivilegeClause('L', NULL)); } + | DROP ANY { $privilegeArray->add(PrivilegeClause('O', NULL)); } + ; + %type <boolVal> grant_option grant_option : /* nothing */ { $$ = false; } @@ -996,6 +1056,14 @@ $node->grantAdminOption = $1; $node->grantor = $8; } + | rev_grant_option ddl_privileges(NOTRIAL(&$node->privileges)) object + FROM non_role_grantee_list(NOTRIAL(&$node->users)) granted_by + { + $node->object = $3; + $node->grantAdminOption = $1; + $node->grantor = $6; + $node->isDdl = true; + } | rev_admin_option role_name_list(NOTRIAL(&$node->roles)) FROM role_grantee_list(NOTRIAL(&$node->users)) granted_by { Modified: firebird/trunk/src/include/gen/codetext.h =================================================================== --- firebird/trunk/src/include/gen/codetext.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/include/gen/codetext.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -795,6 +795,8 @@ {"set_invalid_role", 335545091}, {"cursor_not_positioned", 335545092}, {"dup_attribute", 335545093}, + {"dyn_no_priv", 335545094}, + {"dsql_cant_grant_option", 335545095}, {"gfix_db_name", 335740929}, {"gfix_invalid_sw", 335740930}, {"gfix_incmp_sw", 335740932}, Modified: firebird/trunk/src/include/gen/iberror.h =================================================================== --- firebird/trunk/src/include/gen/iberror.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/include/gen/iberror.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -829,6 +829,8 @@ const ISC_STATUS isc_set_invalid_role = 335545091L; const ISC_STATUS isc_cursor_not_positioned = 335545092L; const ISC_STATUS isc_dup_attribute = 335545093L; +const ISC_STATUS isc_dyn_no_priv = 335545094L; +const ISC_STATUS isc_dsql_cant_grant_option = 335545095L; const ISC_STATUS isc_gfix_db_name = 335740929L; const ISC_STATUS isc_gfix_invalid_sw = 335740930L; const ISC_STATUS isc_gfix_incmp_sw = 335740932L; @@ -1287,7 +1289,7 @@ const ISC_STATUS isc_trace_switch_param_miss = 337182758L; const ISC_STATUS isc_trace_param_act_notcompat = 337182759L; const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L; -const ISC_STATUS isc_err_max = 1231; +const ISC_STATUS isc_err_max = 1233; #else /* c definitions */ @@ -2086,6 +2088,8 @@ #define isc_set_invalid_role 335545091L #define isc_cursor_not_positioned 335545092L #define isc_dup_attribute 335545093L +#define isc_dyn_no_priv 335545094L +#define isc_dsql_cant_grant_option 335545095L #define isc_gfix_db_name 335740929L #define isc_gfix_invalid_sw 335740930L #define isc_gfix_incmp_sw 335740932L @@ -2544,7 +2548,7 @@ #define isc_trace_switch_param_miss 337182758L #define isc_trace_param_act_notcompat 337182759L #define isc_trace_mandatory_switch_miss 337182760L -#define isc_err_max 1231 +#define isc_err_max 1233 #endif Modified: firebird/trunk/src/include/gen/ids.h =================================================================== --- firebird/trunk/src/include/gen/ids.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/include/gen/ids.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -277,6 +277,7 @@ const USHORT f_flt_input = 4; const USHORT f_flt_output = 5; const USHORT f_flt_sys_flag = 6; + const USHORT f_flt_class = 7; // Relation 17 (RDB$TRIGGER_MESSAGES) @@ -449,6 +450,7 @@ const USHORT f_rol_owner = 1; const USHORT f_rol_desc = 2; const USHORT f_rol_sys_flag = 3; + const USHORT f_rol_class = 4; // Relation 32 (RDB$BACKUP_HISTORY) Modified: firebird/trunk/src/include/gen/msgs.h =================================================================== --- firebird/trunk/src/include/gen/msgs.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/include/gen/msgs.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -798,6 +798,8 @@ {335545091, "Role @1 is invalid or unavailable"}, /* set_invalid_role */ {335545092, "Cursor @1 is not positioned in a valid record"}, /* cursor_not_positioned */ {335545093, "Duplicated user attribute @1"}, /* dup_attribute */ + {335545094, "There is no privilege for this operation"}, /* dyn_no_priv */ + {335545095, "Using GRANT OPTION on @1 not allowed"}, /* dsql_cant_grant_option */ {335740929, "data base file name (@1) already given"}, /* gfix_db_name */ {335740930, "invalid switch @1"}, /* gfix_invalid_sw */ {335740932, "incompatible switch combination"}, /* gfix_incmp_sw */ Modified: firebird/trunk/src/include/gen/sql_code.h =================================================================== --- firebird/trunk/src/include/gen/sql_code.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/include/gen/sql_code.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -794,6 +794,8 @@ {335545091, -901}, /* 771 set_invalid_role */ {335545092, -596}, /* 772 cursor_not_positioned */ {335545093, -901}, /* 773 dup_attribute */ + {335545094, -901}, /* 774 dyn_no_priv */ + {335545095, -901}, /* 775 dsql_cant_grant_option */ {335740929, -901}, /* 1 gfix_db_name */ {335740930, -901}, /* 2 gfix_invalid_sw */ {335740932, -901}, /* 4 gfix_incmp_sw */ Modified: firebird/trunk/src/include/gen/sql_state.h =================================================================== --- firebird/trunk/src/include/gen/sql_state.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/include/gen/sql_state.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -794,6 +794,8 @@ {335545091, "0P000"}, // 771 set_invalid_role {335545092, "HY109"}, // 772 cursor_not_positioned {335545093, "42702"}, // 773 dup_attribute + {335545094, "42000"}, // 774 dyn_no_priv + {335545095, "42000"}, // 775 dsql_cant_grant_option {335740929, "00000"}, // 1 gfix_db_name {335740930, "00000"}, // 2 gfix_invalid_sw {335740932, "00000"}, // 4 gfix_incmp_sw Modified: firebird/trunk/src/jrd/Database.h =================================================================== --- firebird/trunk/src/jrd/Database.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/jrd/Database.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -411,7 +411,6 @@ Firebird::PathName dbb_filename; // filename string Firebird::PathName dbb_database_name; // database ID (file name or alias) - Firebird::MetaName dbb_owner; // database owner Firebird::SyncObject dbb_pools_sync; @@ -494,6 +493,7 @@ dbb_modules(*p), dbb_extManager(*p), dbb_filename(*p), + dbb_owner(*p), dbb_database_name(*p), dbb_pools(*p, 4), dbb_sort_buffers(*p), Modified: firebird/trunk/src/jrd/acl.h =================================================================== --- firebird/trunk/src/jrd/acl.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/jrd/acl.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -50,7 +50,10 @@ const int priv_execute = 11; // EXECUTE (procedure, function, package) // New in FB3 const int priv_usage = 12; // USAGE (domain, exception, sequence, collation) -const int priv_max = 13; +const int priv_create = 13; // Create object +const int priv_alter_any = 14; // Alter any object +const int priv_drop_any = 15; // Drop any object +const int priv_max = 16; // Identification criterias @@ -69,7 +72,8 @@ // New in FB3 const int id_package = 12; // Package name const int id_function = 13; // Function name -const int id_max = 14; +const int id_filter = 14; // Filter name +const int id_max = 15; /* Format of access control list: Modified: firebird/trunk/src/jrd/constants.h =================================================================== --- firebird/trunk/src/jrd/constants.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/jrd/constants.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -132,6 +132,8 @@ const int SQL_SECCLASS_PREFIX_LEN = 4; const char* const SQL_FLD_SECCLASS_PREFIX = "SQL$GRANT"; const int SQL_FLD_SECCLASS_PREFIX_LEN = 9; +const char* const GEN_SECCLASS_PREFIX = "GEN$"; +const int GEN_SECCLASS_PREFIX_LEN = 4; // Automatically created check constraints for unnamed PRIMARY and UNIQUE declarations. const char* const IMPLICIT_INTEGRITY_PREFIX = "INTEG_"; Modified: firebird/trunk/src/jrd/drq.h =================================================================== --- firebird/trunk/src/jrd/drq.h 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/jrd/drq.h 2014-07-08 07:35:27 UTC (rev 59840) @@ -232,6 +232,9 @@ drq_e_gen_prvs, // erase generator privileges drq_e_gfld_prvs, // erase domain privileges drq_g_nxt_nbakhist_id, // generate next history ID for nbackup + drq_l_index_relname, // lookup relation name for index + drq_l_trigger_relname, // loopup relation name for trigger + drq_l_grant_option, // loopup grant option for privilege drq_MAX }; Modified: firebird/trunk/src/jrd/filters.cpp =================================================================== --- firebird/trunk/src/jrd/filters.cpp 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/jrd/filters.cpp 2014-07-08 07:35:27 UTC (rev 59840) @@ -94,7 +94,10 @@ "update", "references", "execute", - "usage" + "usage", + "create", + "alter_any", + "drop_any" }; static const TEXT* acl_ids[id_max] = Modified: firebird/trunk/src/jrd/grant.epp =================================================================== --- firebird/trunk/src/jrd/grant.epp 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/jrd/grant.epp 2014-07-08 07:35:27 UTC (rev 59840) @@ -141,7 +141,11 @@ break; default: - break; + if (id >= obj_database && + id < obj_type_MAX) + { + priv = OWNER_PRIVS; + } } grant_user(acl, owner, obj_user, priv); @@ -472,6 +476,20 @@ } END_FOR } + else if (obj_type == obj_database) + { + s_class = attachment->att_security_class->scl_name; + default_class = ""; + owner = tdbb->getDatabase()->dbb_owner; + view = false; + } + else + { + s_class = get_object_name(obj_type); + default_class = ""; + owner = tdbb->getDatabase()->dbb_owner; + view = false; + } } @@ -882,6 +900,15 @@ case 'G': priv |= SCL_usage; break; + case 'C': + priv |= SCL_create; + break; + case 'L': + priv |= SCL_alter; + break; + case 'O': + priv |= SCL_drop; + break; } return priv; Modified: firebird/trunk/src/jrd/ini.epp =================================================================== --- firebird/trunk/src/jrd/ini.epp 2014-07-08 00:52:54 UTC (rev 59839) +++ firebird/trunk/src/jrd/ini.epp 2014-07-08 07:35:27 UTC (rev 59840) @@ -72,6 +72,7 @@ static void add_index_set(thread_db*); static void add_security_to_sys_obj(thread_db*, const MetaName&, USHORT, const MetaName&, USHORT = 0, const UCHAR* = NULL); +static void add_security_class(thread_db* tdbb, const MetaName& class_name, USHORT acl_length, const UCHAR* acl); static void add_security_to_sys_rel(thread_db*, const MetaName&, const TEXT*, const USHORT, const UCHAR*); static void store_generator(thread_db*, const gen*, AutoRequest&, const MetaName&); @@ -477,6 +478,13 @@ add_security_to_sys_obj(tdbb, ownerName, obj_collation, collation->name, length, buffer); } + for (int ddl_obj = obj_database + 1; ddl_obj < obj_type_MAX; ddl_obj++) + { + add_security_class(tdbb, get_object_name(ddl_obj), length, buffer); + } + + add_security_to_sys_obj(tdbb, ownerName, obj_database, "", length, buffer); + // Add security on system tables const UCHAR REL_OWNER_ACL[] = @@ -1137,6 +1145,17 @@ } END_FOR } + else if (obj_type == obj_database) + { + FOR(REQUEST_HANDLE handle) DB IN RDB$DATABASE + { + MODIFY DB USING + DB.RDB$SECURITY_CLASS.NULL = FALSE; + PAD(security_class.c_str(), DB.RDB$SECURITY_CLASS); + END_MODIFY + } + END_FOR + } handle.reset(); @@ -1155,6 +1174,30 @@ } +// Add security class. +static void add_security_class(thread_db* tdbb, const MetaName& class_name, USHORT acl_length, const UCHAR* acl) +{ + SET_TDBB(tdbb); + Jrd::Attachment* const attachment = tdbb->getAttachment(); + + bid blob_id; + attachment->storeBinaryBlob(td... [truncated message content] |
From: <fir...@us...> - 2014-07-09 00:37:19
|
Revision: 59841 http://sourceforge.net/p/firebird/code/59841 Author: firebirds Date: 2014-07-09 00:37:11 +0000 (Wed, 09 Jul 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-07-08 07:35:27 UTC (rev 59840) +++ firebird/trunk/ChangeLog 2014-07-09 00:37:11 UTC (rev 59841) @@ -1,3 +1,41 @@ + 2014-07-08 07:35 roman-simakov + A doc/sql.extensions/README.ddl_access.txt + M lang_helpers/gds_codes.ftn + M lang_helpers/gds_codes.pas + M src/dsql/DdlNodes.epp + M src/dsql/DdlNodes.h + M src/dsql/Nodes.h + M src/dsql/PackageNodes.epp + M src/dsql/PackageNodes.h + M src/dsql/parse.y + M src/include/gen/codetext.h + M src/include/gen/iberror.h + M src/include/gen/ids.h + M src/include/gen/msgs.h + M src/include/gen/sql_code.h + M src/include/gen/sql_state.h + M src/jrd/Database.h + M src/jrd/acl.h + M src/jrd/constants.h + M src/jrd/drq.h + M src/jrd/filters.cpp + M src/jrd/grant.epp + M src/jrd/ini.epp + M src/jrd/intl.h + M src/jrd/jrd.h + M src/jrd/met.epp + M src/jrd/obj.h + M src/jrd/relations.h + M src/jrd/scl.epp + M src/jrd/scl.h + M src/jrd/scl_proto.h + M src/jrd/vio.cpp + M src/msgs/facilities2.sql + M src/msgs/messages2.sql + M src/msgs/system_errors2.sql +Fixed CORE-735: User rights for metadata changes. +We check DDL in DDL nodes and skip at vio level. vio level still exists for direct metadata editing. + 2014-07-06 21:15 hvlad M src/auth/trusted/AuthSspi.cpp Fixed Windows build Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-07-08 07:35:27 UTC (rev 59840) +++ firebird/trunk/src/jrd/build_no.h 2014-07-09 00:37:11 UTC (rev 59841) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31216 + FORMAL BUILD NUMBER:31217 */ -#define PRODUCT_VER_STRING "3.0.0.31216" -#define FILE_VER_STRING "WI-T3.0.0.31216" -#define LICENSE_VER_STRING "WI-T3.0.0.31216" -#define FILE_VER_NUMBER 3, 0, 0, 31216 +#define PRODUCT_VER_STRING "3.0.0.31217" +#define FILE_VER_STRING "WI-T3.0.0.31217" +#define LICENSE_VER_STRING "WI-T3.0.0.31217" +#define FILE_VER_NUMBER 3, 0, 0, 31217 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31216" +#define FB_BUILD_NO "31217" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-07-08 07:35:27 UTC (rev 59840) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-07-09 00:37:11 UTC (rev 59841) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31216 +BuildNum=31217 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <asf...@us...> - 2014-07-10 02:21:22
|
Revision: 59842 http://sourceforge.net/p/firebird/code/59842 Author: asfernandes Date: 2014-07-10 02:21:18 +0000 (Thu, 10 Jul 2014) Log Message: ----------- Misc. Modified Paths: -------------- firebird/trunk/examples/dbcrypt/CryptKeyHolder.cpp firebird/trunk/examples/dbcrypt/DbCrypt.cpp firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp firebird/trunk/src/common/Auth.cpp firebird/trunk/src/common/classes/ImplementHelper.h firebird/trunk/src/common/security.h firebird/trunk/src/dsql/DdlNodes.epp firebird/trunk/src/dsql/DdlNodes.h firebird/trunk/src/dsql/Nodes.h firebird/trunk/src/dsql/PackageNodes.epp firebird/trunk/src/dsql/parse.y firebird/trunk/src/jrd/grant.epp firebird/trunk/src/jrd/ini.epp firebird/trunk/src/jrd/jrd.h firebird/trunk/src/jrd/obj.h firebird/trunk/src/jrd/scl.epp Modified: firebird/trunk/examples/dbcrypt/CryptKeyHolder.cpp =================================================================== --- firebird/trunk/examples/dbcrypt/CryptKeyHolder.cpp 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/examples/dbcrypt/CryptKeyHolder.cpp 2014-07-10 02:21:18 UTC (rev 59842) @@ -267,7 +267,7 @@ p->addRef(); return p; } - catch(const Exception& ex) + catch (const Exception& ex) { ex.stuffException(status); } Modified: firebird/trunk/examples/dbcrypt/DbCrypt.cpp =================================================================== --- firebird/trunk/examples/dbcrypt/DbCrypt.cpp 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/examples/dbcrypt/DbCrypt.cpp 2014-07-10 02:21:18 UTC (rev 59842) @@ -255,7 +255,7 @@ p->addRef(); return p; } - catch(const Exception& ex) + catch (const Exception& ex) { ex.stuffException(status); } Modified: firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp =================================================================== --- firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/auth/SecurityDatabase/LegacyManagement.epp 2014-07-10 02:21:18 UTC (rev 59842) @@ -560,74 +560,74 @@ Firebird::LocalStatus s2; Firebird::IStatus* s = st; FOR (TRANSACTION_HANDLE transaction REQUEST_HANDLE request) U IN PLG$VIEW_USERS - try - { + try { - Firebird::string attr, a1, a2, a3; + { + Firebird::string attr, a1, a2, a3; - if (!U.PLG$UID.NULL) - a1.printf("Uid=%d\n", U.PLG$UID); + if (!U.PLG$UID.NULL) + a1.printf("Uid=%d\n", U.PLG$UID); - if (!U.PLG$GID.NULL) - a2.printf("Gid=%d\n", U.PLG$GID); + if (!U.PLG$GID.NULL) + a2.printf("Gid=%d\n", U.PLG$GID); - if (!U.PLG$GROUP_NAME.NULL) - a3.printf("GroupName=%s\n", U.PLG$GROUP_NAME); + if (!U.PLG$GROUP_NAME.NULL) + a3.printf("GroupName=%s\n", U.PLG$GROUP_NAME); - attr = a1 + a2 + a3; - user->attributes()->set(s, attr.c_str()); + attr = a1 + a2 + a3; + user->attributes()->set(s, attr.c_str()); + check(s); + user->attributes()->setEntered(s, attr.hasData() ? 1 : 0); + check(s); + } + + user->userName()->set(s, U.PLG$USER_NAME); check(s); - user->attributes()->setEntered(s, attr.hasData() ? 1 : 0); + user->userName()->setEntered(s, U.PLG$USER_NAME.NULL ? 0 : 1); check(s); - } + user->password()->set(s, ""); + check(s); + user->password()->setEntered(s, 0); + check(s); + user->firstName()->set(s, U.PLG$FIRST_NAME); + check(s); + user->firstName()->setEntered(s, U.PLG$FIRST_NAME.NULL ? 0 : 1); + check(s); + user->middleName()->set(s, U.PLG$MIDDLE_NAME); + check(s); + user->middleName()->setEntered(s, U.PLG$MIDDLE_NAME.NULL ? 0 : 1); + check(s); + user->lastName()->set(s, U.PLG$LAST_NAME); + check(s); + user->lastName()->setEntered(s, U.PLG$LAST_NAME.NULL ? 0 : 1); + check(s); - user->userName()->set(s, U.PLG$USER_NAME); - check(s); - user->userName()->setEntered(s, U.PLG$USER_NAME.NULL ? 0 : 1); - check(s); - user->password()->set(s, ""); - check(s); - user->password()->setEntered(s, 0); - check(s); - user->firstName()->set(s, U.PLG$FIRST_NAME); - check(s); - user->firstName()->setEntered(s, U.PLG$FIRST_NAME.NULL ? 0 : 1); - check(s); - user->middleName()->set(s, U.PLG$MIDDLE_NAME); - check(s); - user->middleName()->setEntered(s, U.PLG$MIDDLE_NAME.NULL ? 0 : 1); - check(s); - user->lastName()->set(s, U.PLG$LAST_NAME); - check(s); - user->lastName()->setEntered(s, U.PLG$LAST_NAME.NULL ? 0 : 1); - check(s); + user->admin()->set(s, 0); + check(s); + user->admin()->setEntered(s, 1); + check(s); - user->admin()->set(s, 0); - check(s); - user->admin()->setEntered(s, 1); - check(s); + FOR (TRANSACTION_HANDLE transaction REQUEST_HANDLE request2) + P IN RDB$USER_PRIVILEGES + WITH P.RDB$USER EQ U.PLG$USER_NAME AND + P.RDB$RELATION_NAME EQ 'RDB$ADMIN' AND + P.RDB$PRIVILEGE EQ 'M' + { + user->admin()->set(s, 1); + } + END_FOR + check(s); - FOR (TRANSACTION_HANDLE transaction REQUEST_HANDLE request2) - P IN RDB$USER_PRIVILEGES - WITH P.RDB$USER EQ U.PLG$USER_NAME AND - P.RDB$RELATION_NAME EQ 'RDB$ADMIN' AND - P.RDB$PRIVILEGE EQ 'M' + callback->list(s, user); + check(s); + + found = true; + } + catch(const Firebird::Exception& ex) { - user->admin()->set(s, 1); + ex.stuffException(s); + s = &s2; } - END_FOR - check(s); - - callback->list(s, user); - check(s); - - found = true; - } - catch(const Firebird::Exception& ex) - { - ex.stuffException(s); - s = &s2; - } END_FOR ON_ERROR ret = GsecMsg28; // gsec - find/display record error @@ -644,71 +644,70 @@ FOR (TRANSACTION_HANDLE transaction REQUEST_HANDLE request) U IN PLG$VIEW_USERS WITH U.PLG$USER_NAME EQ user->userName()->get() - try - { - if (!U.PLG$UID.NULL) - a1.printf("Uid=%d\n", U.PLG$UID); + try + { + if (!U.PLG$UID.NULL) + a1.printf("Uid=%d\n", U.PLG$UID); - if (!U.PLG$GID.NULL) - a2.printf("Gid=%d\n", U.PLG$GID); + if (!U.PLG$GID.NULL) + a2.printf("Gid=%d\n", U.PLG$GID); - if (!U.PLG$GROUP_NAME.NULL) - a3.printf("GroupName=%s\n", U.PLG$GROUP_NAME); + if (!U.PLG$GROUP_NAME.NULL) + a3.printf("GroupName=%s\n", U.PLG$GROUP_NAME); - attr = a1 + a2 + a3; - user->attributes()->set(s, attr.c_str()); - check(s); - user->attributes()->setEntered(s, attr.hasData() ? 1 : 0); - check(s); + attr = a1 + a2 + a3; + user->attributes()->set(s, attr.c_str()); + check(s); + user->attributes()->setEntered(s, attr.hasData() ? 1 : 0); + check(s); - user->userName()->set(s, U.PLG$USER_NAME); - check(s); - user->userName()->setEntered(s, U.PLG$USER_NAME.NULL ? 0 : 1); - check(s); - user->password()->set(s, ""); - check(s); - user->password()->setEntered(s, 0); - check(s); - user->firstName()->set(s, U.PLG$FIRST_NAME); - check(s); - user->firstName()->setEntered(s, U.PLG$FIRST_NAME.NULL ? 0 : 1); - check(s); - user->middleName()->set(s, U.PLG$MIDDLE_NAME); - check(s); - user->middleName()->setEntered(s, U.PLG$MIDDLE_NAME.NULL ? 0 : 1); - check(s); - user->lastName()->set(s, U.PLG$LAST_NAME); - check(s); - user->lastName()->setEntered(s, U.PLG$LAST_NAME.NULL ? 0 : 1); - check(s); + user->userName()->set(s, U.PLG$USER_NAME); + check(s); + user->userName()->setEntered(s, U.PLG$USER_NAME.NULL ? 0 : 1); + check(s); + user->password()->set(s, ""); + check(s); + user->password()->setEntered(s, 0); + check(s); + user->firstName()->set(s, U.PLG$FIRST_NAME); + check(s); + user->firstName()->setEntered(s, U.PLG$FIRST_NAME.NULL ? 0 : 1); + check(s); + user->middleName()->set(s, U.PLG$MIDDLE_NAME); + check(s); + user->middleName()->setEntered(s, U.PLG$MIDDLE_NAME.NULL ? 0 : 1); + check(s); + user->lastName()->set(s, U.PLG$LAST_NAME); + check(s); + user->lastName()->setEntered(s, U.PLG$LAST_NAME.NULL ? 0 : 1); + check(s); - user->admin()->set(s, 0); - check(s); - user->admin()->setEntered(s, 1); - check(s); + user->admin()->set(s, 0); + check(s); + user->admin()->setEntered(s, 1); + check(s); + FOR (TRANSACTION_HANDLE transaction REQUEST_HANDLE request2) + P IN RDB$USER_PRIVILEGES + WITH P.RDB$USER EQ U.PLG$USER_NAME AND + P.RDB$RELATION_NAME EQ 'RDB$ADMIN' AND + P.RDB$PRIVILEGE EQ 'M' + { + user->admin()->set(s, 1); + } + END_FOR + check(s); - FOR (TRANSACTION_HANDLE transaction REQUEST_HANDLE request2) - P IN RDB$USER_PRIVILEGES - WITH P.RDB$USER EQ U.PLG$USER_NAME AND - P.RDB$RELATION_NAME EQ 'RDB$ADMIN' AND - P.RDB$PRIVILEGE EQ 'M' + callback->list(s, user); + check(s); + + found = true; + } + catch(const Firebird::Exception& ex) { - user->admin()->set(s, 1); + ex.stuffException(s); + s = &s2; } - END_FOR - check(s); - - callback->list(s, user); - check(s); - - found = true; - } - catch(const Firebird::Exception& ex) - { - ex.stuffException(s); - s = &s2; - } END_FOR ON_ERROR ret = GsecMsg28; // gsec - find/display record error Modified: firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp =================================================================== --- firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp 2014-07-10 02:21:18 UTC (rev 59842) @@ -511,8 +511,10 @@ LocalStatus s; TimerInterfacePtr()->start(&s, instance, 10 * 1000 * 1000); if (!s.isSuccess()) + instance->handler(); +#else + instance->handler(); #endif - instance->handler(); return rc; } catch (const Firebird::Exception& ex) Modified: firebird/trunk/src/common/Auth.cpp =================================================================== --- firebird/trunk/src/common/Auth.cpp 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/common/Auth.cpp 2014-07-10 02:21:18 UTC (rev 59842) @@ -75,7 +75,7 @@ } type = "USER"; } - catch(const Firebird::Exception& ex) + catch (const Firebird::Exception& ex) { ex.stuffException(st); } @@ -105,7 +105,7 @@ if (value) type = value; } - catch(const Firebird::Exception& ex) + catch (const Firebird::Exception& ex) { ex.stuffException(st); } @@ -122,7 +122,7 @@ current.insertPath(AuthReader::AUTH_SECURE_DB, target); } } - catch(const Firebird::Exception& ex) + catch (const Firebird::Exception& ex) { ex.stuffException(st); } Modified: firebird/trunk/src/common/classes/ImplementHelper.h =================================================================== --- firebird/trunk/src/common/classes/ImplementHelper.h 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/common/classes/ImplementHelper.h 2014-07-10 02:21:18 UTC (rev 59842) @@ -153,7 +153,7 @@ p->addRef(); return p; } - catch(const Firebird::Exception& ex) + catch (const Firebird::Exception& ex) { ex.stuffException(status); } Modified: firebird/trunk/src/common/security.h =================================================================== --- firebird/trunk/src/common/security.h 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/common/security.h 2014-07-10 02:21:18 UTC (rev 59842) @@ -74,7 +74,7 @@ { value = newValue ? newValue : ""; } - catch(const Firebird::Exception& ex) + catch (const Firebird::Exception& ex) { ex.stuffException(status); } Modified: firebird/trunk/src/dsql/DdlNodes.epp =================================================================== --- firebird/trunk/src/dsql/DdlNodes.epp 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/dsql/DdlNodes.epp 2014-07-10 02:21:18 UTC (rev 59842) @@ -748,7 +748,8 @@ //---------------------- SecureDdlNodeExecute::SecureDdlNodeExecute(thread_db* tdbb, DdlNode* ddlNode, - DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction): _tdbb(tdbb) + DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) + : _tdbb(tdbb) { if (ddlNode->checkPermission(tdbb, transaction)) tdbb->tdbb_flags |= TDBB_trusted_ddl; @@ -1382,7 +1383,7 @@ bool CreateAlterFunctionNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { dsc dscName; - dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + dscName.makeText(name.length(), CS_METADATA, (UCHAR*) name.c_str()); if (alter) SCL_check_function(tdbb, &dscName, SCL_alter); else @@ -2011,7 +2012,7 @@ bool AlterExternalFunctionNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { dsc dscName; - dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + dscName.makeText(name.length(), CS_METADATA, (UCHAR*) name.c_str()); SCL_check_function(tdbb, &dscName, SCL_alter); return true; } @@ -2136,7 +2137,7 @@ bool DropFunctionNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { dsc dscName; - dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + dscName.makeText(name.length(), CS_METADATA, (UCHAR*) name.c_str()); SCL_check_function(tdbb, &dscName, SCL_drop); return true; } @@ -2329,7 +2330,7 @@ bool CreateAlterProcedureNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { dsc dscName; - dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + dscName.makeText(name.length(), CS_METADATA, (UCHAR*) name.c_str()); if (alter) SCL_check_procedure(tdbb, &dscName, SCL_alter); else @@ -2883,7 +2884,7 @@ bool DropProcedureNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { dsc dscName; - dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + dscName.makeText(name.length(), CS_METADATA, (UCHAR*) name.c_str()); SCL_check_procedure(tdbb, &dscName, SCL_drop); return true; } @@ -3146,7 +3147,7 @@ bool CreateAlterTriggerNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { dsc dscName; - dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*)relationName.c_str()); + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*) relationName.c_str()); SCL_check_relation(tdbb, &dscName, SCL_alter); return true; } @@ -3342,7 +3343,7 @@ status_exception::raise(Arg::PrivateDyn(48)); } - dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*)relationName.c_str()); + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*) relationName.c_str()); SCL_check_relation(tdbb, &dscName, SCL_alter); return true; } @@ -4859,6 +4860,7 @@ { Attachment* const attachment = transaction->getAttachment(); const string& userName = attachment->att_user->usr_user_name; + executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_CREATE_EXCEPTION, name); @@ -6844,7 +6846,7 @@ bool AlterRelationNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { dsc dscName; - dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + dscName.makeText(name.length(), CS_METADATA, (UCHAR*) name.c_str()); SCL_check_relation(tdbb, &dscName, SCL_alter); return true; } @@ -7540,7 +7542,7 @@ bool DropRelationNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { dsc dscName; - dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + dscName.makeText(name.length(), CS_METADATA, (UCHAR*) name.c_str()); if (view) SCL_check_view(tdbb, &dscName, SCL_drop); else @@ -7785,7 +7787,7 @@ bool CreateAlterViewNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { dsc dscName; - dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + dscName.makeText(name.length(), CS_METADATA, (UCHAR*) name.c_str()); if (alter) SCL_check_view(tdbb, &dscName, SCL_alter); else @@ -7848,6 +7850,7 @@ REL.RDB$VIEW_BLR NOT MISSING { found = true; + MODIFY REL attachment->storeMetaDataBlob(tdbb, transaction, &REL.RDB$VIEW_SOURCE, source); attachment->storeBinaryBlob(tdbb, transaction, &REL.RDB$VIEW_BLR, @@ -8918,7 +8921,7 @@ { dsc dscName; const MetaName &relationName = relation->dsqlName; - dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*)relationName.c_str()); + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*) relationName.c_str()); SCL_check_relation(tdbb, &dscName, SCL_alter); return true; } @@ -9003,7 +9006,7 @@ status_exception::raise(Arg::PrivateDyn(48)); } - dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*)relationName.c_str()); + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*) relationName.c_str()); SCL_check_relation(tdbb, &dscName, SCL_alter); return true; } @@ -9075,7 +9078,7 @@ status_exception::raise(Arg::PrivateDyn(48)); } - dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*)relationName.c_str()); + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*) relationName.c_str()); SCL_check_relation(tdbb, &dscName, SCL_alter); return true; } @@ -9166,7 +9169,7 @@ status_exception::raise(Arg::PrivateDyn(48)); } - dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*)relationName.c_str()); + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*) relationName.c_str()); SCL_check_relation(tdbb, &dscName, SCL_alter); return true; } @@ -10006,15 +10009,15 @@ executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_DROP_ROLE, name); - + if (ROL.RDB$SYSTEM_FLAG != 0) { // msg 284: can not drop system SQL role @1 status_exception::raise(Arg::PrivateDyn(284) << name); } - + AutoCacheRequest request2(tdbb, drq_del_role_1, DYN_REQUESTS); // The first OR clause finds all members of the role. @@ -10373,23 +10376,24 @@ break; } - if (options == 1) { // with grant option - switch (userType) { - case obj_procedure: { + if (options == 1) // with grant option + { + switch (userType) + { + case obj_procedure: ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("procedures")); break; - } - case obj_trigger: { + + case obj_trigger: ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("triggers")); break; - } - case obj_view: { + + case obj_view: ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("views")); break; - } - default: { + + default: break; - } } } @@ -10531,7 +10535,8 @@ tdbb->getAttachment()->att_user->usr_user_name.c_str(), priv, objName, field, true); } - else if (objType >= obj_database) { + else if (objType >= obj_database) + { checkGrantorCanGrantDdl(tdbb, transaction, tdbb->getAttachment()->att_user->usr_user_name.c_str(), priv, objName); } @@ -10872,7 +10877,7 @@ // Check if the grantor has grant option on DDL privilege void GrantRevokeNode::checkGrantorCanGrantDdl(thread_db* tdbb, jrd_tra* transaction, - const Firebird::MetaName& grantor, const char* privilege, const Firebird::MetaName& objName) + const MetaName& grantor, const char* privilege, const MetaName& objName) { if (tdbb->getAttachment()->locksmith()) return; @@ -10880,13 +10885,13 @@ AutoCacheRequest request(tdbb, drq_l_grant_option, DYN_REQUESTS); bool grantable = false; - FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) - PRV IN RDB$USER_PRIVILEGES WITH - PRV.RDB$USER = UPPERCASE(grantor.c_str()) AND - PRV.RDB$USER_TYPE = obj_user AND - PRV.RDB$RELATION_NAME EQ objName.c_str() AND - PRV.RDB$OBJECT_TYPE >= obj_database AND - PRV.RDB$PRIVILEGE EQ privilege + FOR (REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + PRV IN RDB$USER_PRIVILEGES + WITH PRV.RDB$USER = UPPERCASE(grantor.c_str()) AND + PRV.RDB$USER_TYPE = obj_user AND + PRV.RDB$RELATION_NAME EQ objName.c_str() AND + PRV.RDB$OBJECT_TYPE >= obj_database AND + PRV.RDB$PRIVILEGE EQ privilege { grantable = PRV.RDB$GRANT_OPTION == 1; } Modified: firebird/trunk/src/dsql/DdlNodes.h =================================================================== --- firebird/trunk/src/dsql/DdlNodes.h 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/dsql/DdlNodes.h 2014-07-10 02:21:18 UTC (rev 59842) @@ -2031,7 +2031,7 @@ case 'G': return "Usage"; case 'M': return "Role"; case 'R': return "Reference"; - //ddl + // ddl case 'C': return "Create"; case 'L': return "Alter"; case 'O': return "DROP"; @@ -2048,7 +2048,7 @@ Firebird::Array<GranteeClause> users; bool grantAdminOption; NestConst<Firebird::MetaName> grantor; - // ddl rights + // ddl rights bool isDdl; }; Modified: firebird/trunk/src/dsql/Nodes.h =================================================================== --- firebird/trunk/src/dsql/Nodes.h 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/dsql/Nodes.h 2014-07-10 02:21:18 UTC (rev 59842) @@ -158,7 +158,7 @@ { public: explicit SecureDdlNodeExecute(thread_db* tdbb, DdlNode* ddlNode, - DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); + DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); ~SecureDdlNodeExecute() { Modified: firebird/trunk/src/dsql/PackageNodes.epp =================================================================== --- firebird/trunk/src/dsql/PackageNodes.epp 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/dsql/PackageNodes.epp 2014-07-10 02:21:18 UTC (rev 59842) @@ -462,7 +462,7 @@ bool CreateAlterPackageNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { dsc dscName; - dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + dscName.makeText(name.length(), CS_METADATA, (UCHAR*) name.c_str()); if (alter) SCL_check_package(tdbb, &dscName, SCL_alter); else @@ -635,7 +635,7 @@ bool DropPackageNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { dsc dscName; - dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + dscName.makeText(name.length(), CS_METADATA, (UCHAR*) name.c_str()); SCL_check_package(tdbb, &dscName, SCL_drop); return true; } @@ -1095,7 +1095,7 @@ bool DropPackageBodyNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { dsc dscName; - dscName.makeText(name.length(), CS_METADATA, (UCHAR*)name.c_str()); + dscName.makeText(name.length(), CS_METADATA, (UCHAR*) name.c_str()); SCL_check_package(tdbb, &dscName, SCL_drop); return true; } Modified: firebird/trunk/src/dsql/parse.y =================================================================== --- firebird/trunk/src/dsql/parse.y 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/dsql/parse.y 2014-07-10 02:21:18 UTC (rev 59842) @@ -855,7 +855,8 @@ ; %type <granteeClause> object -object : TABLE +object + : TABLE { $$ = newNode<GranteeClause>(obj_relations, get_object_name(obj_relations)); } | VIEW { $$ = newNode<GranteeClause>(obj_views, get_object_name(obj_views)); } @@ -925,8 +926,18 @@ %type ddl_privileges(<privilegeArray>) ddl_privileges($privilegeArray) - : ALL { $privilegeArray->add(PrivilegeClause('C', NULL)); $privilegeArray->add(PrivilegeClause('L', NULL)); $privilegeArray->add(PrivilegeClause('O', NULL)); } - | ALL PRIVILEGES { $privilegeArray->add(PrivilegeClause('C', NULL)); $privilegeArray->add(PrivilegeClause('L', NULL)); $privilegeArray->add(PrivilegeClause('O', NULL)); } + : ALL + { + $privilegeArray->add(PrivilegeClause('C', NULL)); + $privilegeArray->add(PrivilegeClause('L', NULL)); + $privilegeArray->add(PrivilegeClause('O', NULL)); + } + | ALL PRIVILEGES + { + $privilegeArray->add(PrivilegeClause('C', NULL)); + $privilegeArray->add(PrivilegeClause('L', NULL)); + $privilegeArray->add(PrivilegeClause('O', NULL)); + } | ddl_privilege_list($privilegeArray) ; Modified: firebird/trunk/src/jrd/grant.epp =================================================================== --- firebird/trunk/src/jrd/grant.epp 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/jrd/grant.epp 2014-07-10 02:21:18 UTC (rev 59842) @@ -141,11 +141,9 @@ break; default: - if (id >= obj_database && - id < obj_type_MAX) - { + if (id >= obj_database && id < obj_type_MAX) priv = OWNER_PRIVS; - } + break; } grant_user(acl, owner, obj_user, priv); Modified: firebird/trunk/src/jrd/ini.epp =================================================================== --- firebird/trunk/src/jrd/ini.epp 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/jrd/ini.epp 2014-07-10 02:21:18 UTC (rev 59842) @@ -478,7 +478,7 @@ add_security_to_sys_obj(tdbb, ownerName, obj_collation, collation->name, length, buffer); } - for (int ddl_obj = obj_database + 1; ddl_obj < obj_type_MAX; ddl_obj++) + for (int ddl_obj = obj_database + 1; ddl_obj < obj_type_MAX; ++ddl_obj) { add_security_class(tdbb, get_object_name(ddl_obj), length, buffer); } @@ -1182,7 +1182,7 @@ bid blob_id; attachment->storeBinaryBlob(tdbb, attachment->getSysTransaction(), &blob_id, - ByteChunk(acl, acl_length)); + ByteChunk(acl, acl_length)); AutoRequest handle; @@ -1193,8 +1193,6 @@ CLS.RDB$ACL = blob_id; } END_STORE - - handle.reset(); } Modified: firebird/trunk/src/jrd/jrd.h =================================================================== --- firebird/trunk/src/jrd/jrd.h 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/jrd/jrd.h 2014-07-10 02:21:18 UTC (rev 59842) @@ -369,7 +369,7 @@ const USHORT TDBB_detaching = 512; // detach is in progress const USHORT TDBB_wait_cancel_disable = 1024; // don't cancel current waiting operation const USHORT TDBB_cache_unwound = 2048; // page cache was unwound -const USHORT TDBB_trusted_ddl = 4096; // skip DDL permission checks. set after DDL permission check and clear after DDL execution +const USHORT TDBB_trusted_ddl = 4096; // skip DDL permission checks. Set after DDL permission check and clear after DDL execution class thread_db : public Firebird::ThreadData { Modified: firebird/trunk/src/jrd/obj.h =================================================================== --- firebird/trunk/src/jrd/obj.h 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/jrd/obj.h 2014-07-10 02:21:18 UTC (rev 59842) @@ -48,17 +48,17 @@ const int obj_package_header = 18; const int obj_package_body = 19; -//objects types for ddl operations +// objects types for ddl operations const int obj_database = 20; const int obj_relations = 21; -const int obj_views = 22; +const int obj_views = 22; const int obj_procedures = 23; const int obj_functions = 24; const int obj_packages = 25; const int obj_generators = 26; const int obj_domains = 27; const int obj_exceptions = 28; -const int obj_roles = 29; +const int obj_roles = 29; const int obj_shadows = 30; const int obj_charsets = 31; const int obj_collations = 32; Modified: firebird/trunk/src/jrd/scl.epp =================================================================== --- firebird/trunk/src/jrd/scl.epp 2014-07-09 00:37:11 UTC (rev 59841) +++ firebird/trunk/src/jrd/scl.epp 2014-07-10 02:21:18 UTC (rev 59842) @@ -1249,28 +1249,28 @@ * S C L _ g e t _ o b j e c t _ m a s k * ************************************** - * + * * Functional description * Get a protection mask for database object. * **************************************/ thread_db* tdbb = JRD_get_thread_data(); Database* dbb = tdbb->getDatabase(); - + UserId* user = tdbb->getAttachment()->att_user; /*if (object_type == obj_roles) { if (user->isSecAdmin()) - return -1 & ~SCL_corrupt; + return -1 & ~SCL_corrupt; }*/ - + const TEXT* object_name = get_object_name(object_type); const Jrd::SecurityClass* s_class = SCL_recompute_class(tdbb, object_name); - + if (s_class) return s_class->scl_flags; - + return -1 & ~SCL_corrupt; } @@ -1283,7 +1283,7 @@ ************************************** * * Functional description - * Set user attributes. + * Set user attributes. * **************************************/ thread_db* tdbb = JRD_get_thread_data(); @@ -1293,7 +1293,7 @@ if (!user.usr_user_name.compare(dbb->dbb_owner.c_str())) { user.usr_flags |= USR_owner; - } + } } static bool check_number(const UCHAR* acl, USHORT number) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-07-11 00:36:18
|
Revision: 59846 http://sourceforge.net/p/firebird/code/59846 Author: firebirds Date: 2014-07-11 00:36:16 +0000 (Fri, 11 Jul 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-07-10 15:45:02 UTC (rev 59845) +++ firebird/trunk/ChangeLog 2014-07-11 00:36:16 UTC (rev 59846) @@ -1,3 +1,34 @@ + 2014-07-10 15:45 asfernandes + M src/dsql/DdlNodes.epp + M src/dsql/Nodes.h + M src/dsql/parse.y +Simplifications. + + 2014-07-10 02:25 asfernandes + M src/jrd/Database.h + M src/jrd/obj.h +Warnings. + + 2014-07-10 02:21 asfernandes + M examples/dbcrypt/CryptKeyHolder.cpp + M examples/dbcrypt/DbCrypt.cpp + M src/auth/SecurityDatabase/LegacyManagement.epp + M src/auth/SecurityDatabase/LegacyServer.cpp + M src/common/Auth.cpp + M src/common/classes/ImplementHelper.h + M src/common/security.h + M src/dsql/DdlNodes.epp + M src/dsql/DdlNodes.h + M src/dsql/Nodes.h + M src/dsql/PackageNodes.epp + M src/dsql/parse.y + M src/jrd/grant.epp + M src/jrd/ini.epp + M src/jrd/jrd.h + M src/jrd/obj.h + M src/jrd/scl.epp +Misc. + 2014-07-08 07:35 roman-simakov A doc/sql.extensions/README.ddl_access.txt M lang_helpers/gds_codes.ftn Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-07-10 15:45:02 UTC (rev 59845) +++ firebird/trunk/src/jrd/build_no.h 2014-07-11 00:36:16 UTC (rev 59846) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31217 + FORMAL BUILD NUMBER:31220 */ -#define PRODUCT_VER_STRING "3.0.0.31217" -#define FILE_VER_STRING "WI-T3.0.0.31217" -#define LICENSE_VER_STRING "WI-T3.0.0.31217" -#define FILE_VER_NUMBER 3, 0, 0, 31217 +#define PRODUCT_VER_STRING "3.0.0.31220" +#define FILE_VER_STRING "WI-T3.0.0.31220" +#define LICENSE_VER_STRING "WI-T3.0.0.31220" +#define FILE_VER_NUMBER 3, 0, 0, 31220 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31217" +#define FB_BUILD_NO "31220" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-07-10 15:45:02 UTC (rev 59845) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-07-11 00:36:16 UTC (rev 59846) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31217 +BuildNum=31220 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-07-13 00:24:08
|
Revision: 59867 http://sourceforge.net/p/firebird/code/59867 Author: firebirds Date: 2014-07-13 00:24:05 +0000 (Sun, 13 Jul 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-07-12 18:38:53 UTC (rev 59866) +++ firebird/trunk/ChangeLog 2014-07-13 00:24:05 UTC (rev 59867) @@ -1,3 +1,18 @@ + 2014-07-12 08:04 dimitr + M src/jrd/DatabaseSnapshot.h + M src/jrd/Mapping.h + M src/jrd/UserManagement.h + M src/jrd/opt.cpp + M src/jrd/recsrc/BitmapTableScan.cpp + M src/jrd/recsrc/ExternalTableScan.cpp + M src/jrd/recsrc/FullTableScan.cpp + M src/jrd/recsrc/IndexTableScan.cpp + M src/jrd/recsrc/ProcedureScan.cpp + M src/jrd/recsrc/RecordSource.cpp + M src/jrd/recsrc/RecordSource.h + M src/jrd/recsrc/VirtualTableScan.cpp +Improved the detailed plan output (report both table name and its alias). + 2014-07-10 15:45 asfernandes M src/dsql/DdlNodes.epp M src/dsql/Nodes.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-07-12 18:38:53 UTC (rev 59866) +++ firebird/trunk/src/jrd/build_no.h 2014-07-13 00:24:05 UTC (rev 59867) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31220 + FORMAL BUILD NUMBER:31221 */ -#define PRODUCT_VER_STRING "3.0.0.31220" -#define FILE_VER_STRING "WI-T3.0.0.31220" -#define LICENSE_VER_STRING "WI-T3.0.0.31220" -#define FILE_VER_NUMBER 3, 0, 0, 31220 +#define PRODUCT_VER_STRING "3.0.0.31221" +#define FILE_VER_STRING "WI-T3.0.0.31221" +#define LICENSE_VER_STRING "WI-T3.0.0.31221" +#define FILE_VER_NUMBER 3, 0, 0, 31221 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31220" +#define FB_BUILD_NO "31221" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-07-12 18:38:53 UTC (rev 59866) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-07-13 00:24:05 UTC (rev 59867) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31220 +BuildNum=31221 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-07-14 00:27:34
|
Revision: 59871 http://sourceforge.net/p/firebird/code/59871 Author: firebirds Date: 2014-07-14 00:27:26 +0000 (Mon, 14 Jul 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-07-13 18:50:57 UTC (rev 59870) +++ firebird/trunk/ChangeLog 2014-07-14 00:27:26 UTC (rev 59871) @@ -1,3 +1,16 @@ + 2014-07-13 18:50 roman-simakov + M src/dsql/DdlNodes.h + M src/jrd/vio.cpp +Corrections pointed by Adriano. + + 2014-07-13 01:33 asfernandes + M src/jrd/scl.epp +Misc. + + 2014-07-13 01:33 asfernandes + M src/msgs/facilities2.sql +Correction. + 2014-07-12 08:04 dimitr M src/jrd/DatabaseSnapshot.h M src/jrd/Mapping.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-07-13 18:50:57 UTC (rev 59870) +++ firebird/trunk/src/jrd/build_no.h 2014-07-14 00:27:26 UTC (rev 59871) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31221 + FORMAL BUILD NUMBER:31224 */ -#define PRODUCT_VER_STRING "3.0.0.31221" -#define FILE_VER_STRING "WI-T3.0.0.31221" -#define LICENSE_VER_STRING "WI-T3.0.0.31221" -#define FILE_VER_NUMBER 3, 0, 0, 31221 +#define PRODUCT_VER_STRING "3.0.0.31224" +#define FILE_VER_STRING "WI-T3.0.0.31224" +#define LICENSE_VER_STRING "WI-T3.0.0.31224" +#define FILE_VER_NUMBER 3, 0, 0, 31224 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31221" +#define FB_BUILD_NO "31224" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-07-13 18:50:57 UTC (rev 59870) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-07-14 00:27:26 UTC (rev 59871) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31221 +BuildNum=31224 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2014-07-14 13:12:15
|
Revision: 59872 http://sourceforge.net/p/firebird/code/59872 Author: roman-simakov Date: 2014-07-14 13:12:12 +0000 (Mon, 14 Jul 2014) Log Message: ----------- Improved description of DDL access control operations. Fixed DB and DDL triggers handling. Thanks to Adriano. Modified Paths: -------------- firebird/trunk/doc/sql.extensions/README.ddl_access.txt firebird/trunk/src/dsql/DdlNodes.epp Modified: firebird/trunk/doc/sql.extensions/README.ddl_access.txt =================================================================== --- firebird/trunk/doc/sql.extensions/README.ddl_access.txt 2014-07-14 00:27:26 UTC (rev 59871) +++ firebird/trunk/doc/sql.extensions/README.ddl_access.txt 2014-07-14 13:12:12 UTC (rev 59872) @@ -7,13 +7,13 @@ Syntax is: -GRANT CREATE <OBJECT> TO USER|ROLE [with grant option]; -GRANT ALTER ANY <OBJECT> TO USER|ROLE [with grant option]; -GRANT DROP ANY <OBJECT> TO USER|ROLE [with grant option]; +GRANT CREATE <OBJECT> TO [USER | ROLE] <user/role name> [with grant option]; +GRANT ALTER ANY <OBJECT> TO [USER | ROLE] <user/role name> [with grant option]; +GRANT DROP ANY <OBJECT> TO [USER | ROLE] <user/role name> [with grant option]; -REVOKE [grant option for] CREATE <OBJECT> FROM USER|ROLE; -REVOKE [grant option for] ALTER ANY <OBJECT> FROM USER|ROLE; -REVOKE [grant option for] DROP ANY <OBJECT> FROM USER|ROLE; +REVOKE [grant option for] CREATE <OBJECT> FROM [USER | ROLE] <user/role name>; +REVOKE [grant option for] ALTER ANY <OBJECT> FROM [USER | ROLE] <user/role name>; +REVOKE [grant option for] DROP ANY <OBJECT> FROM [USER | ROLE] <user/role name>; Where <OBJECT> could be: TABLE, VIEW, PROCEDURE, FUNCTION, PACKAGE, GENERATOR, SEQUENCE, DOMAIN, Modified: firebird/trunk/src/dsql/DdlNodes.epp =================================================================== --- firebird/trunk/src/dsql/DdlNodes.epp 2014-07-14 00:27:26 UTC (rev 59871) +++ firebird/trunk/src/dsql/DdlNodes.epp 2014-07-14 13:12:12 UTC (rev 59872) @@ -3157,9 +3157,16 @@ bool CreateAlterTriggerNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { - dsc dscName; - dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*) relationName.c_str()); - SCL_check_relation(tdbb, &dscName, SCL_alter); + if (relationName.hasData()) + { + dsc dscName; + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*) relationName.c_str()); + SCL_check_relation(tdbb, &dscName, SCL_alter); + } + else + { + SCL_check_database(tdbb, SCL_alter); + } return true; } @@ -3335,7 +3342,6 @@ bool DropTriggerNode::checkPermission(thread_db* tdbb, jrd_tra* transaction) { - dsc dscName; MetaName relationName; AutoCacheRequest request(tdbb, drq_l_trigger_relname, DYN_REQUESTS); @@ -3350,12 +3356,15 @@ if (relationName.isEmpty()) { - // msg 48: "Index not found" - status_exception::raise(Arg::PrivateDyn(48)); + SCL_check_database(tdbb, SCL_alter); } + else + { + dsc dscName; + dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*) relationName.c_str()); + SCL_check_relation(tdbb, &dscName, SCL_alter); + } - dscName.makeText(relationName.length(), CS_METADATA, (UCHAR*) relationName.c_str()); - SCL_check_relation(tdbb, &dscName, SCL_alter); return true; } @@ -3390,9 +3399,6 @@ break; } - if (X.RDB$RELATION_NAME.NULL && !transaction->getAttachment()->locksmith()) - status_exception::raise(Arg::Gds(isc_adm_task_denied)); - executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_DROP_TRIGGER, name); relationName = X.RDB$RELATION_NAME; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2014-07-15 00:28:02
|
Revision: 59874 http://sourceforge.net/p/firebird/code/59874 Author: firebirds Date: 2014-07-15 00:27:54 +0000 (Tue, 15 Jul 2014) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2014-07-14 19:33:47 UTC (rev 59873) +++ firebird/trunk/ChangeLog 2014-07-15 00:27:54 UTC (rev 59874) @@ -1,3 +1,13 @@ + 2014-07-14 19:33 dimitr + M builds/win32/make_all.bat +Added the missing but required (by ICU) runtime lib. + + 2014-07-14 13:12 roman-simakov + M doc/sql.extensions/README.ddl_access.txt + M src/dsql/DdlNodes.epp +Improved description of DDL access control operations. +Fixed DB and DDL triggers handling. Thanks to Adriano. + 2014-07-13 18:50 roman-simakov M src/dsql/DdlNodes.h M src/jrd/vio.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2014-07-14 19:33:47 UTC (rev 59873) +++ firebird/trunk/src/jrd/build_no.h 2014-07-15 00:27:54 UTC (rev 59874) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:31224 + FORMAL BUILD NUMBER:31226 */ -#define PRODUCT_VER_STRING "3.0.0.31224" -#define FILE_VER_STRING "WI-T3.0.0.31224" -#define LICENSE_VER_STRING "WI-T3.0.0.31224" -#define FILE_VER_NUMBER 3, 0, 0, 31224 +#define PRODUCT_VER_STRING "3.0.0.31226" +#define FILE_VER_STRING "WI-T3.0.0.31226" +#define LICENSE_VER_STRING "WI-T3.0.0.31226" +#define FILE_VER_NUMBER 3, 0, 0, 31226 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "31224" +#define FB_BUILD_NO "31226" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Alpha 2" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2014-07-14 19:33:47 UTC (rev 59873) +++ firebird/trunk/src/misc/writeBuildNum.sh 2014-07-15 00:27:54 UTC (rev 59874) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=31224 +BuildNum=31226 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |