| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
a symbol named FSTAT.
|
| | |
|
| |
|
|
|
|
| |
on an existing file.
(this does not seem to be easily testable)
|
| |
|
|
| |
length to 2^31-1 on Windows.
|
| |
|
|
|
| |
use time_t instead of int. This gives support for dates after 2038,
at least when compiled with VS2003 or later, where time_t is 64bit.
|
| |
|
|
| |
when the user doesn't hold the symbolic link privilege rather than hiding it.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
points. (Windows)
- Set S_IEXEC via final path name not link name.
- Set S_IFLNK also via FindFirstFile (when CreateFile fails)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to create symlinks on Windows, SeCreateSymbolicLinkPrivilege
is an account privilege that is required to be held by the user. Not only
must the privilege be enabled for the account, the activated privileges for
the currently running application must be adjusted to enable the requested
privilege.
Rather than exposing an additional function to be called prior to the user's
first os.symlink call, we handle the AdjustTokenPrivileges Windows API call
internally and only expose os.symlink when the privilege escalation was
successful.
Due to the change of only exposing os.symlink when it's available, we can
go back to the original test skipping methods of checking via `hasattr`.
|
| |
|
|
| |
individual sources.
|
| |
|
|
|
|
|
| |
Amaury noticed that this was originally written in a way that would fail on
names that can't be encoded with the mbcs codec. Restructured the function
to work with wide names first then narrow names second, to fall in line
with the way other functions are written in posixmodule.c.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Additionally, the st_ino attribute of stat structures was not being filled
in. This was left out of the fix to #10027 and was noticed due to
test_tarfile failing when applying the patch for this issue. An earlier
version of the fix to #10027 included st_ino, but that attribute got lost
in the shuffle of a few review/fix cycles. All tests pass.
|
| | |
|
| |
|
|
|
|
| |
Note: This patch has no tests because as of now there is no way to create
links. #8879 adds that and the tests will go in there. I've manually observed
that existing links on my system function properly with this.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
The test is semi-dumb, it just makes sure something comes back since we
don't have a solid source to validate the returned login. We can't be 100%
sure that the USERNAME env var will always match what os.getlogin() returns,
so we don't make any specific assertion there.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
the value with filesystem encoding and surrogateescape (instead of utf-8 in
strict mode).
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This uses the GetFileInformationByHandle function to return a tuple of values
to identify a file, then ntpath.sameopenfile compares file tuples, which
is exposed as os.path.sameopenfile.
|
| | |
|
| |
|
|
| |
in the posix module. Patch by Marcin Bachry.
|
| |
|
|
| |
(Also fix a name ordering in the ACKS file.)
|
| | |
|
| | |
|
| |
|
|
|
|
| |
encoding and surrogateescape error handler. Patch written by David Watson.
Reindent also posix_getlogin(), and fix a typo in the NEWS file.
|
| |
|
|
| |
encoding and surrogateescape error handler. Patch written by David Watson.
|
| |
|
|
|
| |
using the filesystem encoding and surrogateescape error handler. Patch
written by David Watson.
|
| |
|
|
| |
Patch by David Watson.
|
| |
|
|
| |
Interpreter Lock around all system calls. Original patch by Ryan Kelly.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
with the fact that getgroups(2) might return
more that MAX_GROUPS on OSX.
See the issue (and python-dev archives) for the
gory details. Summarized: OSX behaves rather oddly
and Apple says this is intentional.
|
| |
|
|
| |
Patch by Virgil Dupras.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added Windows support for os.symlink when run on Windows 6.0 or greater,
aka Vista. Previous Windows versions will raise NotImplementedError
when trying to symlink.
Includes numerous test updates and additions to test_os, including
a symlink_support module because of the fact that privilege escalation
is required in order to run the tests to ensure that the user is able
to create symlinks. By default, accounts do not have the required
privilege, so the escalation code will have to be exposed later (or
documented on how to do so). I'll be following up with that work next.
Note that the tests use ctypes, which was agreed on during the PyCon
language summit.
|
| |
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82047 | senthil.kumaran | 2010-06-17 22:08:34 +0530 (Thu, 17 Jun 2010) | 3 lines
Fix Issue4452 - Incorrect docstring of os.setpgrp
........
|
| | |
|
| |
|
|
|
|
| |
Use directly PyUnicode_DecodeFSDefaultAndSize() instead of
PyBytes_FromStringAndSize() + PyUnicode_FromEncodedObject() if the argument is
unicode.
|
| |
|
|
|
|
| |
PyUnicode_DecodeFSDefaultAndSize() and call
PyErr_SetFromErrnoWithFilenameObject() instead of
PyErr_SetFromErrnoWithFilename()
|
| |
|
|
| |
"surrogateescape") by PyUnicode_DecodeFSDefault(val).
|