Skip to content

Commit

Permalink
Merge branch 'no-serveserve-symlink'
Browse files Browse the repository at this point in the history
  • Loading branch information
gregneagle committed Jun 19, 2018
2 parents 0f42d6e + 18ef54c commit 470013a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions code/client/munkilib/updatecheck/core.py
Expand Up @@ -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
Expand Down

0 comments on commit 470013a

Please sign in to comment.