Skip to content

Commit

Permalink
Add deleted user as user for darwin folder parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ydkhatri committed May 10, 2024
1 parent af8a849 commit 4e41852
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
11 changes: 11 additions & 0 deletions plugins/helpers/macinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,17 @@ def _GetDarwinFoldersInfo(self):
break
if not found_user:
log.error('Could not find username for UID={} GID={} PATH={}'.format(uid, gid, path))
log.info(f'Creating new user as unknown_uid_{uid}')
deleted_user = UserInfo()
deleted_user.DARWIN_USER_DIR = path + '/0'
deleted_user.DARWIN_USER_CACHE_DIR = path + '/C'
deleted_user.DARWIN_USER_TEMP_DIR = path + '/T'
deleted_user.real_name = f'unknown_uid_{uid}'
deleted_user.user_name = f'unknown_uid_{uid}'
deleted_user.home_dir = '/UNKNOWN/'
deleted_user.UID = str(uid)
deleted_user.GID = str(gid)
self.users.append(deleted_user)

def _GetSystemInfo(self):
''' Gets system version information'''
Expand Down
1 change: 0 additions & 1 deletion plugins/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def GetAutoLoginUser(mac_info):
log.error('Failed to read plist ' + loginwindow_plist_path + " Error was : " + error_message)
return user

#Not sure if this still exists post 10.9
def GetDeletedUsers(mac_info):
deleted_users = []
plist_path = '/Library/Preferences/com.apple.preferences.accounts.plist'
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__VERSION = "1.7.3.dev (20240330)"
__VERSION = "1.7.5.dev (20240510)"

0 comments on commit 4e41852

Please sign in to comment.