Database | Proc | Application | Created | Links |
sybsystemprocs | sp_grantlogin | 31 Aug 14 | Defects Dependencies |
1 2 create proc sp_grantlogin 3 @account varchar(30) = NULL, 4 @privileges varchar(255) = NULL 5 as 6 7 declare @msg varchar(255) 8 9 /* 10 ** check if user has sso role, proc_role will also do auditing 11 ** if required. proc_role will also print error message if required. 12 */ 13 14 if (proc_role("sso_role") = 0) 15 return (1) 16 17 dbcc iseadmin("grantlogin", @account, @privileges) 18 19 /* if no error, reported success */ 20 if @@error = 0 21 begin 22 /* 23 ** 18069, "Access granted." 24 */ 25 exec sp_getmessage 18069, @msg output 26 print @msg 27 return (0) 28 end 29 30 /* 31 ** If there was an error, the specific message was already sent to client 32 ** within the iseadmin() module. 33 */ 34 35 return (1) 36 37 /* end of sp_grantlogin */ 38
DEFECTS | |
MNER 3 No Error Check should check return value of exec | 25 |
MUCO 3 Useless Code Useless Brackets | 14 |
MUCO 3 Useless Code Useless Brackets | 15 |
MUCO 3 Useless Code Useless Brackets | 27 |
MUCO 3 Useless Code Useless Brackets | 35 |
MTR1 2 Metrics: Comments Ratio Comments: 44% | 2 |
MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 2 = 2dec - 2exi + 2 | 2 |
MTR3 2 Metrics: Query Complexity Complexity: 12 | 2 |
DEPENDENCIES |
PROCS AND TABLES USED calls proc sybsystemprocs..sp_getmessage reads table sybsystemprocs..sysusermessages reads table master..sysmessages (1) reads table master..syslanguages (1) calls proc sybsystemprocs..sp_validlang reads table master..syslanguages (1) |