|
-
Nov 8th, 2004, 04:44 PM
#1
SQL 2k SP Security? [Resolved]
I cant test this at the moment, but if I have a userdefined sp in
my db and I make a nested call to a system sp in the master db,
will my users have any issues executing the user defined sp if
they only have permissions assigned to it and not the nested
system sp below?
In other words, will the security permissions cascade down to the
system sp?
Thanks.
Last edited by RobDog888; Nov 9th, 2004 at 04:46 PM.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 9th, 2004, 07:34 AM
#2
Fanatic Member
System SP's in Master by default grant exec permissions to public. If these permissions have been changed, then you WILL need to grant exec permission on the system sp's in master to the users that need to execute them.
Chris
Master Of My Domain
Got A Question? Look Here First
-
Nov 9th, 2004, 07:46 AM
#3
I checked BOL but I cant find anything useful, I think that nested SP's execute with higher permissions than the user who ran the original SP (I used xp_sendmail like that when we had denied permission on it).
-
Nov 9th, 2004, 09:21 AM
#4
I am under the impression that you only grant access to the USER SP that is being called and whatever it does inside is automatically granted.
In other words - the permissions cascade.
I'm 95% sure anyway...
-
Nov 9th, 2004, 11:00 AM
#5
The answer, like so many others, is "it depends".
Depends on the system stored procedure that you are calling and it depends on the contents of the stored procedure.
I am assuming you are using Exec. Here is some info from BOL.
Permissions
EXECUTE permissions for a stored procedure default to the owner of the stored procedure, who can transfer them to other users. Permissions to use the statement(s) within the EXECUTE string are checked at the time EXECUTE is encountered, even if the EXECUTE statement is included within a stored procedure. When a stored procedure is run that executes a string, permissions are checked in the context of the user who executes the procedure, not in the context of the user who created the procedure. However, if a user owns two stored procedures in which the first procedure calls the second, then EXECUTE permission checking is not performed for the second stored procedure
-
Nov 9th, 2004, 02:05 PM
#6
Basically I am wrapping the sp_who sp with one of my own. I thought
it would be better to call it this way, but if not then I would just
have the code call it from the master db. My way allows me to
assign permissions to my sp and hopefully the permissions would
cascade down to the sp_who system sp.
Is this correct then?
Thanks.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 9th, 2004, 04:27 PM
#7
Can't you just rip to SPROC source from the MASTER SPROC and put it into your own SPROC - so that you don't have to call the MASTER SPROC at all?
I've seen someone suggest this once - never did it myself though...
-
Nov 9th, 2004, 04:46 PM
#8
Yes, I guess I could. I was just trying to keep it simple, but I made
it more complicated then it should of been. 
Thanks.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 9th, 2004, 08:01 PM
#9
As long as the user has permissions to execute your stored procedure they will have the permission to execute the sp_who procedure. sp_who, by default, is available to everyone.
It is not recommended to query the system tables directly but that is entirely up to you.
-
Nov 9th, 2004, 09:49 PM
#10
So then how should I call it or just copy it over to my db?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 10th, 2004, 02:50 AM
#11
You could just call the sp_who procedure directly, otherwise something like this would also work.
Code:
Create Procedure dbo.ShowWhosOnline
As
Exec sp_who
-
Nov 10th, 2004, 11:53 AM
#12
That is how I originally was doing it and I was wondering about
any permissions needed if the permissions dont cascade down to
the sp_who sp.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|