Skip to content
Snippets Groups Projects
Unverified Commit 1e07ca4b authored by Richard Cordovano's avatar Richard Cordovano Committed by GitHub
Browse files

Merge pull request #2512 from APriestman/7882_fixConnectionIssue

Don't open new connection for os account instance
parents a397493d 9663f235
Branches
Tags
No related merge requests found
...@@ -386,7 +386,10 @@ private long addBatchedFilesToDb() { ...@@ -386,7 +386,10 @@ private long addBatchedFilesToDb() {
// Currently we expect only NTFS systems to provide a windows style SID as owner id. // Currently we expect only NTFS systems to provide a windows style SID as owner id.
OsAccountManager accountMgr = caseDb.getOsAccountManager(); OsAccountManager accountMgr = caseDb.getOsAccountManager();
OsAccount newAccount = accountMgr.newWindowsOsAccount(ownerUid, null, null, imageHost, OsAccountRealm.RealmScope.UNKNOWN); OsAccount newAccount = accountMgr.newWindowsOsAccount(ownerUid, null, null, imageHost, OsAccountRealm.RealmScope.UNKNOWN);
accountMgr.newOsAccountInstance(newAccount.getId(), fileInfo.dataSourceObjId, OsAccountInstance.OsAccountInstanceType.LAUNCHED, caseDb.getConnection()); Content ds = caseDb.getContentById(fileInfo.dataSourceObjId); // Data sources are cached so this will only access the database once
if (ds instanceof DataSource) {
accountMgr.newOsAccountInstance(newAccount, (DataSource)ds, OsAccountInstance.OsAccountInstanceType.LAUNCHED);
}
ownerIdToAccountMap.put(ownerUid, newAccount); ownerIdToAccountMap.put(ownerUid, newAccount);
} }
} catch (NotUserSIDException ex) { } catch (NotUserSIDException ex) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment