Permalink
Browse files

Merge branch 'no-serveserve-symlink'

  • Loading branch information...
gregneagle committed Jun 19, 2018
2 parents 0f42d6e + 18ef54c commit 470013ac8a1da355cc9a7728368887191a0296c6
Showing with 12 additions and 0 deletions.
  1. +12 −0 code/client/munkilib/updatecheck/core.py
@@ -224,6 +224,18 @@ def check(client_id='', localmanifestpath=None):
usermanifest = '/Users/Shared/.SelfServeManifest'
selfservemanifest = os.path.join(
managed_install_dir, 'manifests', 'SelfServeManifest')

if os.path.islink(usermanifest):
# not allowed as it could link to things not normally
# readable by unprivileged users
try:
os.unlink(usermanifest)
except OSError:
pass
display.display_warning(
"Found symlink at %s. Ignoring and removing."
% selfservemanifest)

if os.path.exists(usermanifest):
# copy user-generated SelfServeManifest to our
# managed_install_dir

0 comments on commit 470013a

Please sign in to comment.