Skip to Content
0

Execute as owner: permission denied ASE 15.7 SP 136++, worked fine for SP 131

Sep 15, 2017 at 09:56 AM

16

avatar image
Dear all,

I have have a behaviour, that I cannot explain by any of the CR that are listed for the SP 131-136 notes: For SP 131 the code below works fine, for SP136 and above an execute permission denied error pops up. There are no other databases involved as it is the case in the somewhat similar KB2202914.

I'd be happy to hear from you
Best Regards

create login test_user_a with password '123456' default database MYDB
create login test_user_b with password '123456' default database MYDB
create login test_user_c with password '123456' default database MYDB
go
use MYDB
go
exec sp_adduser @loginame='test_user_a'
exec sp_adduser @loginame='test_user_b'
exec sp_adduser @loginame='test_user_c'
go
-- create test proc C
grant create procedure to test_user_c
setuser 'test_user_c'
go
create procedure proc_c with execute as owner as select @@version
go
-- create test proc B
grant create procedure to test_user_b
setuser 'test_user_b'
go
create procedure proc_b with execute as owner as exec test_user_c.proc_c
go
-- create test proc A
grant create procedure to test_user_a
setuser 'test_user_a'
go
create procedure proc_a as exec test_user_b.proc_b
go
setuser 'test_user_a'
go
exec proc_a
-- Works for 15.7. SP 131
-- For 15.7. SP 136 following error is displayed:
-- EXECUTE permission denied on object proc_c, database MYDB, owner test_user_c
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers