mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Merge pull request #6835 from gdicristofaro/7461-osAccountManagerChanges
7461 os account manager changes
This commit is contained in:
commit
7428b06bcc
@ -144,10 +144,10 @@ public final class OsAccounts implements AutopsyVisitableItem {
|
||||
if(skCase != null) {
|
||||
try {
|
||||
if (filteringDSObjId == 0) {
|
||||
list.addAll(skCase.getOsAccountManager().getAccounts());
|
||||
list.addAll(skCase.getOsAccountManager().getOsAccounts());
|
||||
} else {
|
||||
Host host = skCase.getHostManager().getHost(skCase.getDataSource(filteringDSObjId));
|
||||
list.addAll(skCase.getOsAccountManager().getAccounts(host));
|
||||
list.addAll(skCase.getOsAccountManager().getOsAccounts(host));
|
||||
}
|
||||
} catch (TskCoreException | TskDataException ex) {
|
||||
logger.log(Level.SEVERE, "Unable to retrieve list of OsAccounts for case", ex);
|
||||
|
@ -1081,7 +1081,7 @@ class ExtractRegistry extends Extract {
|
||||
HostManager hostMrg = tskCase.getHostManager();
|
||||
Host host = hostMrg.getHost((DataSource)dataSource);
|
||||
|
||||
List<OsAccount> existingAccounts = accountMgr.getAccounts(host);
|
||||
List<OsAccount> existingAccounts = accountMgr.getOsAccounts(host);
|
||||
for(OsAccount osAccount: existingAccounts) {
|
||||
Optional<String> optional = osAccount.getAddr();
|
||||
if(!optional.isPresent()) {
|
||||
@ -1097,7 +1097,7 @@ class ExtractRegistry extends Extract {
|
||||
|
||||
//add remaining userinfos as accounts;
|
||||
for (Map<String, String> userInfo : userInfoMap.values()) {
|
||||
OsAccount osAccount = accountMgr.createWindowsAccount(userInfo.get(SID_KEY), null, null, host, OsAccountRealm.RealmScope.UNKNOWN);
|
||||
OsAccount osAccount = accountMgr.createWindowsOsAccount(userInfo.get(SID_KEY), null, null, host, OsAccountRealm.RealmScope.UNKNOWN);
|
||||
accountMgr.createOsAccountInstance(osAccount, (DataSource)dataSource, OsAccountInstance.OsAccountInstanceType.LAUNCHED);
|
||||
updateOsAccount(osAccount, userInfo, groupMap.get(userInfo.get(SID_KEY)), regAbstractFile);
|
||||
}
|
||||
@ -1969,10 +1969,10 @@ class ExtractRegistry extends Extract {
|
||||
HostManager hostMrg = tskCase.getHostManager();
|
||||
Host host = hostMrg.getHost((DataSource)dataSource);
|
||||
|
||||
Optional<OsAccount> optional = accountMgr.getWindowsAccount(sid, null, null, host);
|
||||
Optional<OsAccount> optional = accountMgr.getWindowsOsAccount(sid, null, null, host);
|
||||
OsAccount osAccount;
|
||||
if (!optional.isPresent()) {
|
||||
osAccount = accountMgr.createWindowsAccount(sid, userName != null && userName.isEmpty() ? null : userName, null, host, OsAccountRealm.RealmScope.UNKNOWN);
|
||||
osAccount = accountMgr.createWindowsOsAccount(sid, userName != null && userName.isEmpty() ? null : userName, null, host, OsAccountRealm.RealmScope.UNKNOWN);
|
||||
accountMgr.createOsAccountInstance(osAccount, (DataSource)dataSource, OsAccountInstance.OsAccountInstanceType.LAUNCHED);
|
||||
} else {
|
||||
osAccount = optional.get();
|
||||
@ -1989,7 +1989,7 @@ class ExtractRegistry extends Extract {
|
||||
osAccount.addAttributes(attributes);
|
||||
}
|
||||
|
||||
accountMgr.updateAccount(osAccount);
|
||||
accountMgr.updateOsAccount(osAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2164,7 +2164,7 @@ class ExtractRegistry extends Extract {
|
||||
}
|
||||
|
||||
osAccount.addAttributes(attributes);
|
||||
tskCase.getOsAccountManager().updateAccount(osAccount);
|
||||
tskCase.getOsAccountManager().updateOsAccount(osAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -113,7 +113,7 @@ final class RAOsAccountCache {
|
||||
*/
|
||||
private void buildAccountMap(SleuthkitCase tskCase, Host host) throws TskCoreException {
|
||||
BlackboardAttribute.Type homeDir = new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_HOME_DIR);
|
||||
List<OsAccount> accounts = tskCase.getOsAccountManager().getAccounts(host);
|
||||
List<OsAccount> accounts = tskCase.getOsAccountManager().getOsAccounts(host);
|
||||
|
||||
for (OsAccount account : accounts) {
|
||||
List<OsAccountAttribute> attributeList = account.getOsAccountAttributes();
|
||||
|
Loading…
x
Reference in New Issue
Block a user