diff --git a/ext/bin/tap-mac/com.zerotier.tap.kext/Contents/MacOS/tap b/ext/bin/tap-mac/com.zerotier.tap.kext/Contents/MacOS/tap deleted file mode 100755 index 48bf96255..000000000 Binary files a/ext/bin/tap-mac/com.zerotier.tap.kext/Contents/MacOS/tap and /dev/null differ diff --git a/ext/bin/tap-mac/com.zerotier.tap.kext/Contents/Info.plist b/ext/bin/tap-mac/tap.kext.old/Contents/Info.plist similarity index 97% rename from ext/bin/tap-mac/com.zerotier.tap.kext/Contents/Info.plist rename to ext/bin/tap-mac/tap.kext.old/Contents/Info.plist index c20eefa58..45c2839ad 100644 --- a/ext/bin/tap-mac/com.zerotier.tap.kext/Contents/Info.plist +++ b/ext/bin/tap-mac/tap.kext.old/Contents/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType KEXT CFBundleShortVersionString - 20150118 + 20131028 CFBundleSignature ???? CFBundleVersion diff --git a/ext/bin/tap-mac/tap.kext.old/Contents/MacOS/tap b/ext/bin/tap-mac/tap.kext.old/Contents/MacOS/tap new file mode 100755 index 000000000..6a9021a74 Binary files /dev/null and b/ext/bin/tap-mac/tap.kext.old/Contents/MacOS/tap differ diff --git a/ext/bin/tap-mac/tap.kext/Contents/_CodeSignature/CodeDirectory b/ext/bin/tap-mac/tap.kext.old/Contents/_CodeSignature/CodeDirectory similarity index 100% rename from ext/bin/tap-mac/tap.kext/Contents/_CodeSignature/CodeDirectory rename to ext/bin/tap-mac/tap.kext.old/Contents/_CodeSignature/CodeDirectory diff --git a/ext/bin/tap-mac/tap.kext/Contents/_CodeSignature/CodeRequirements b/ext/bin/tap-mac/tap.kext.old/Contents/_CodeSignature/CodeRequirements similarity index 100% rename from ext/bin/tap-mac/tap.kext/Contents/_CodeSignature/CodeRequirements rename to ext/bin/tap-mac/tap.kext.old/Contents/_CodeSignature/CodeRequirements diff --git a/ext/bin/tap-mac/com.zerotier.tap.kext/Contents/_CodeSignature/CodeResources b/ext/bin/tap-mac/tap.kext.old/Contents/_CodeSignature/CodeResources similarity index 100% rename from ext/bin/tap-mac/com.zerotier.tap.kext/Contents/_CodeSignature/CodeResources rename to ext/bin/tap-mac/tap.kext.old/Contents/_CodeSignature/CodeResources diff --git a/ext/bin/tap-mac/tap.kext/Contents/_CodeSignature/CodeSignature b/ext/bin/tap-mac/tap.kext.old/Contents/_CodeSignature/CodeSignature similarity index 100% rename from ext/bin/tap-mac/tap.kext/Contents/_CodeSignature/CodeSignature rename to ext/bin/tap-mac/tap.kext.old/Contents/_CodeSignature/CodeSignature diff --git a/ext/bin/tap-mac/tap.kext/Contents/Info.plist b/ext/bin/tap-mac/tap.kext/Contents/Info.plist index 45c2839ad..c20eefa58 100644 --- a/ext/bin/tap-mac/tap.kext/Contents/Info.plist +++ b/ext/bin/tap-mac/tap.kext/Contents/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType KEXT CFBundleShortVersionString - 20131028 + 20150118 CFBundleSignature ???? CFBundleVersion diff --git a/ext/bin/tap-mac/tap.kext/Contents/MacOS/tap b/ext/bin/tap-mac/tap.kext/Contents/MacOS/tap index 6a9021a74..48bf96255 100755 Binary files a/ext/bin/tap-mac/tap.kext/Contents/MacOS/tap and b/ext/bin/tap-mac/tap.kext/Contents/MacOS/tap differ diff --git a/ext/installfiles/mac/launch.sh b/ext/installfiles/mac/launch.sh index ef22ccbd0..41c4b9c8c 100755 --- a/ext/installfiles/mac/launch.sh +++ b/ext/installfiles/mac/launch.sh @@ -1,15 +1,7 @@ #!/bin/bash zthome="/Library/Application Support/ZeroTier/One" -export PATH="/bin:/usr/bin:/sbin:/usr/sbin:$zthome" - -# If the app has been deleted, uninstall the service -cd "$zthome" -if [ -L './shutdownIfUnreadable' -a ! -f "`readlink ./shutdownIfUnreadable`" ]; then - rm -f /tmp/ZeroTierOneUninstall.log - /bin/bash "$zthome/uninstall.sh" >/tmp/ZeroTierOneUninstall.log 2>&1 - exit 0 -fi +export PATH="$zthome:/bin:/usr/bin:/sbin:/usr/sbin" # Launch ZeroTier One (not as daemon... launchd monitors it) exec zerotier-one diff --git a/ext/installfiles/mac/postinst.sh b/ext/installfiles/mac/postinst.sh index 987e131b7..47d9ddd96 100755 --- a/ext/installfiles/mac/postinst.sh +++ b/ext/installfiles/mac/postinst.sh @@ -6,10 +6,12 @@ launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1 cd "/Library/Application Support/ZeroTier/One" rm -rf node.log node.log.old root-topology shutdownIfUnreadable autoupdate.log updates.d +chown -R 0 tap.kext +chgrp -R 0 tap.kext if [ ! -f authtoken.secret ]; then head -c 4096 /dev/urandom | md5 | head -c 24 >authtoken.secret - chown root authtoken.secret - chgrp wheel authtoken.secret + chown 0 authtoken.secret + chgrp 0 authtoken.secret chmod 0600 authtoken.secret fi rm -f zerotier-cli zerotier-idtool