mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-29 14:41:09 +01:00
Mssql driver update (#2610)
* Switching driver from mssql to sqlserver * Adding explicit database to sp_msloginmappings call
This commit is contained in:
parent
8efdae67e5
commit
6b55ab5db0
@ -78,7 +78,7 @@ func (b *backend) DB(s logical.Storage) (*sql.DB, error) {
|
|||||||
}
|
}
|
||||||
connString := connConfig.ConnectionString
|
connString := connConfig.ConnectionString
|
||||||
|
|
||||||
db, err := sql.Open("mssql", connString)
|
db, err := sql.Open("sqlserver", connString)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@ -102,7 +102,7 @@ func (b *backend) secretCredsRevoke(
|
|||||||
// we need to drop the database users before we can drop the login and the role
|
// we need to drop the database users before we can drop the login and the role
|
||||||
// This isn't done in a transaction because even if we fail along the way,
|
// This isn't done in a transaction because even if we fail along the way,
|
||||||
// we want to remove as much access as possible
|
// we want to remove as much access as possible
|
||||||
stmt, err := db.Prepare(fmt.Sprintf("EXEC sp_msloginmappings '%s';", username))
|
stmt, err := db.Prepare(fmt.Sprintf("EXEC master.dbo.sp_msloginmappings '%s';", username))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user