Re: How to disable dangerous extended stored procedures In SQL2005



Russell Fields (russellfields@xxxxxxxxxx) writes:
If you could disable them, you would not want to, since they are used by
SQL Server itself. I see that these by default are granted to the
public role. If you feel safe doing so, you could revoke the permission
to public by:

REVOKE EXECUTE ON xp_dirtree TO public

The system itself should still be able to use these procedures (it runs as
sysadmin after all) but the general user will no longer be able to do so.

xp_dirtree is use among other things for the browse dialog for BACKUP
to permit the user to select where to put the backup.

If backups are only taken by sysadmins, this is not an issue. But if
there are database owners out there who are not sysadmin, removing access
to xp_dirtree could cause some problems.

The same applies to xp_regread, xp_fileexist and others.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: How to disable dangerous extended stored procedures In SQL2005
    ... Actually, we only use these procedures by sysadmin, not database logins. ... xp_dirtree is use among other things for the browse dialog for BACKUP ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.security)
  • Re: SQL Server 2008 caching
    ... Before db lock, i set one parameter ... Why would the user have to log out when you do a backup in the first place? ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: question about autogrowth and shrinkfile
    ... Assuming that you also left out the full backup, ... Yes, leave auto-grow on. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)
  • Re: dropped tables
    ... We Restored from the last backup 12 hours prior... ... Restore it from a backup if you have one. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: permissions required for executing CDOSys stored procedures
    ... he is by default member of the sysadmin server ... role on the SQL Server database unless steps are taken to prevent that. ... sysadmin and who has not been granted specific execute permissions on the ... it is possible to GRANT EXECUTE ON sp_OACreate TO ...
    (microsoft.public.sqlserver.security)