[New-bugs-announce] [issue9333] Expose a way to enable os.symlink on Windows

Brian Curtin report at bugs.python.org
Thu Jul 22 21:58:24 CEST 2010

New submission from Brian Curtin <curtin at acm.org>:

As it currently stands, the possibility exists that some users might not have the SeCreateSymbolicLinkPrivilege privilege enabled (depending on security settings, corporate policy, etc). There should be some method of enabling that privilege outside of the way we do it in the tests (using ctypes).

Attached is a quick prototype...no docs or tests yet. If you don't have the privilege enabled, "os.enable_symlink()" will attempt to enable it for you (True if successful, False if not).

For the security conscious: "The AdjustTokenPrivileges function cannot add new privileges to the access token. It can only enable or disable the token's existing privileges"

assignee: brian.curtin
components: Extension Modules
files: enable_symlink.diff
keywords: patch
messages: 111213
nosy: brian.curtin, eric.smith, jaraco
priority: normal
severity: normal
status: open
title: Expose a way to enable os.symlink on Windows
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file18132/enable_symlink.diff

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list