--is-dba (related) update for Sybase

This commit is contained in:
Miroslav Stampar 2011-02-20 17:28:06 +00:00
parent 4d52f7fc6e
commit 59e666d16e
2 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ class Enumeration:
if Backend.getIdentifiedDbms() == DBMS.MYSQL:
self.getCurrentUser()
query = queries[Backend.getIdentifiedDbms()].is_dba.query % kb.data.currentUser.split("@")[0]
elif Backend.getIdentifiedDbms() == DBMS.MSSQL and user is not None:
elif Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE) and user is not None:
query = queries[Backend.getIdentifiedDbms()].is_dba.query2 % user
else:
query = queries[Backend.getIdentifiedDbms()].is_dba.query

View File

@ -487,7 +487,7 @@
<banner query="SELECT @@VERSION"/>
<current_user query="SELECT SUSER_NAME()"/>
<current_db query="SELECT DB_NAME()"/>
<is_dba query="PATINDEX('%sa_role%', SHOW_ROLE())>0"/>
<is_dba query="PATINDEX('%sa_role%', SHOW_ROLE())>0" query2="EXISTS(SELECT * FROM master..syslogins, master..sysloginroles WHERE srid=0 and name='%s')"/>
<users>
<inband query="SELECT name FROM master..syslogins"/>
<blind/>