Refactor box/lua/call.cc
* Extract high-level IPROTO_CALL code to box.cc * Move execute_c_call to func.cc * Prepare src/lua/call.cc to rewrite in C Incompatible changes: * #300 logic was reverted. An attempt to call an unexisting Lua function without universal execute permissions now cause "access denied" message instead of "function does not exist". Since there is no cache for Lua procedures, existence of a function can be checked only by attempt to execute it. Caller **must** have a permission to execute function in order to execute functions. It's obvious, isn't it? Anyway, this patch doesn't affect user experience with using stored procedures. The two steps still must be performed to allow Lua calls using the binary protocol: 1. A function must be defined in Lua 2. A function must be declared in box.schema and caller must have execute permission for this object or for entire "universe". The order actually doesn't matter - the both steps must be done.
Showing
- src/box/box.cc 90 additions, 0 deletionssrc/box/box.cc
- src/box/box.h 4 additions, 0 deletionssrc/box/box.h
- src/box/func.cc 57 additions, 0 deletionssrc/box/func.cc
- src/box/func.h 15 additions, 0 deletionssrc/box/func.h
- src/box/iproto.cc 8 additions, 4 deletionssrc/box/iproto.cc
- src/box/iproto_port.cc 15 additions, 5 deletionssrc/box/iproto_port.cc
- src/box/iproto_port.h 2 additions, 2 deletionssrc/box/iproto_port.h
- src/box/lua/call.cc 16 additions, 154 deletionssrc/box/lua/call.cc
- src/box/lua/call.h 2 additions, 2 deletionssrc/box/lua/call.h
- src/box/tuple.h 1 addition, 1 deletionsrc/box/tuple.h
- src/box/tuple_convert.cc 6 additions, 2 deletionssrc/box/tuple_convert.cc
- test/box/access.result 2 additions, 2 deletionstest/box/access.result
- test/box/net.box.result 4 additions, 4 deletionstest/box/net.box.result
Loading
Please register or sign in to comment