From 9679eb399d24c05e13cc758c84c65f5052b9ddd8 Mon Sep 17 00:00:00 2001 From: David G Rosenberg Date: Tue, 26 Nov 2019 18:12:10 -0500 Subject: [PATCH] Targets current dir for current user --- CHANGELOG.md | 2 +- build.sh | 2 +- payload/msda.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df8317c..92c9230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.1.3] - 2019-11-26 ### Fixed -* *Actually* fixed bug where using `-feu` would ignore valid user homes +* Fixed bug where the wrong directory was targeted instead of the current user's home ## [1.1.2] - 2019-11-26 ### Fixed diff --git a/build.sh b/build.sh index 78022aa..d614c16 100755 --- a/build.sh +++ b/build.sh @@ -9,7 +9,7 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin project_folder=$(dirname "$0") -find "${project_folder}/payload" -type f -exec chmod 755 {} \; +find "${project_folder}/payload" -type f \( ! -iname "*.pyc" \) -exec chmod 755 {} \; pkgbuild --root "${project_folder}/payload" \ --identifier "${IDENTIFIER}" \ diff --git a/payload/msda.py b/payload/msda.py index 2b37427..676bc67 100755 --- a/payload/msda.py +++ b/payload/msda.py @@ -113,7 +113,7 @@ def get_current_username(): ('cut', '-d', ' ', '-f1'), stdin=grep_cmd.stdout, ) - return username + return username.strip() def gather_user_ls_paths(): gathered_users = os.listdir(USER_HOMES_LOCATION) @@ -257,7 +257,7 @@ def write(self, plist=None): if not plist: plist = self.plist - # create parents directories if they don't exist + # create parent directories if they don't exist create_plist_parents(plist) with NamedTemporaryFile(prefix=TMP_PREFIX, delete=True) as tmp_plist: