summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #10898: Allow compiling the posix module when the C library definesAntoine Pitrou2011-01-191-0/+2
| | | | a symbol named FSTAT.
* Issue #9611: remove useless and dangerous explicit conversion to size_tVictor Stinner2011-01-111-1/+1
|
* Issue #7858: Raise an error properly when os.utime() fails under WindowsAntoine Pitrou2011-01-061-0/+1
| | | | | | on an existing file. (this does not seem to be easily testable)
* Issue #9015, #9611: FileIO.readinto(), FileIO.write() and os.write() clamp theVictor Stinner2011-01-041-2/+9
| | | | length to 2^31-1 on Windows.
* #8278: In the Windows implementation of stat() and utime(),Amaury Forgeot d'Arc2011-01-031-12/+21
| | | | | 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.
* Fix #9333. The symlink function is always available now, raising OSErrorBrian Curtin2010-12-281-19/+13
| | | | when the user doesn't hold the symbolic link privilege rather than hiding it.
* Issue #10637: Called CloseHandle twice in os.stat/os.lstat (Windows)Hirokazu Yamamoto2010-12-071-4/+4
|
* Should use posix_error here.Hirokazu Yamamoto2010-12-051-5/+3
|
* Sorry, I had introduced tab in source code.Hirokazu Yamamoto2010-12-051-1/+1
|
* Fixed several corner case issues on os.stat/os.lstat related to reparseHirokazu Yamamoto2010-12-041-93/+110
| | | | | | | points. (Windows) - Set S_IEXEC via final path name not link name. - Set S_IFLNK also via FindFirstFile (when CreateFile fails)
* Fix #9333. Expose os.symlink on Windows only when usable.Brian Curtin2010-12-021-8/+55
| | | | | | | | | | | | | | | | 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`.
* Include structseq.h in Python.h, and remove now-redundant includes in ↵Georg Brandl2010-11-301-1/+0
| | | | individual sources.
* Fix for #8879.Brian Curtin2010-11-281-2/+18
| | | | | | | 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.
* Windows: fix leak in posix_listdir.Stefan Krah2010-11-271-0/+1
|
* Fix additional leaks.Stefan Krah2010-11-271-0/+2
|
* Further indentation cleanup.Stefan Krah2010-11-261-49/+49
|
* Issue #10383: Fix two leaks.Stefan Krah2010-11-261-7/+11
|
* Fix #8879. Add os.link support to Windows.Brian Curtin2010-11-241-0/+32
| | | | | | | | 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.
* ifdef a Windows specific section.Brian Curtin2010-11-241-0/+2
|
* Fix #10027. st_nlink not set on Windows calls to os.stat/lstat.Brian Curtin2010-11-241-302/+279
| | | | | | 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.
* Issue #10143: Update "os.pathconf" valuesJesus Cea2010-10-251-0/+33
|
* Fix a typo. full->finalBrian Curtin2010-09-241-1/+1
|
* #9808. Implement os.getlogin for Windows, completed by Jon Anglin.Brian Curtin2010-09-231-2/+15
| | | | | | | 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.
* Issue #9908: Fix os.stat() on bytes paths under Windows 7.Antoine Pitrou2010-09-211-17/+31
|
* Remove unused code in posixmodule.cAmaury Forgeot d'Arc2010-09-171-68/+0
|
* Remove C++-style commentsAntoine Pitrou2010-09-141-2/+2
|
* Issue #9579, #9580: Fix os.confstr() for value longer than 255 bytes and encodeVictor Stinner2010-09-101-20/+22
| | | | | the value with filesystem encoding and surrogateescape (instead of utf-8 in strict mode).
* Untabify file.Amaury Forgeot d'Arc2010-09-101-3/+3
|
* #6394: Add os.getppid() support for Windows.Amaury Forgeot d'Arc2010-09-071-2/+52
|
* Implement #7566 - os.path.sameopenfile for Windows.Brian Curtin2010-09-061-0/+28
| | | | | | 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.
* #9747: fix copy-paste error in getresgid() doc.Georg Brandl2010-09-051-1/+1
|
* Issue #7736: Release the GIL around calls to opendir() and closedir()Antoine Pitrou2010-09-041-1/+10
| | | | in the posix module. Patch by Marcin Bachry.
* #7647: add ST_RDONLY, ST_NOSUID constants to os module.Andrew M. Kuchling2010-08-181-0/+8
| | | | (Also fix a name ordering in the ACKS file.)
* r82659 reintroduced some tab characters. Untabify again.Amaury Forgeot d'Arc2010-08-161-7/+7
|
* Fix other warnings under 64-bit Windows.Antoine Pitrou2010-08-151-4/+5
|
* Issue #9605: posix.getlogin() decodes the username with file filesystemVictor Stinner2010-08-151-4/+3
| | | | | | encoding and surrogateescape error handler. Patch written by David Watson. Reindent also posix_getlogin(), and fix a typo in the NEWS file.
* Issue #9604: posix.initgroups() encodes the username using the fileystemVictor Stinner2010-08-151-2/+8
| | | | encoding and surrogateescape error handler. Patch written by David Watson.
* Issue #9603: posix.ttyname() and posix.ctermid() decode the terminal nameVictor Stinner2010-08-151-2/+2
| | | | | using the filesystem encoding and surrogateescape error handler. Patch written by David Watson.
* use pep 383 decoding for mknod and mkfifo #9570Benjamin Peterson2010-08-111-2/+10
| | | | Patch by David Watson.
* Issue #6915: Under Windows, os.listdir() didn't release the GlobalAntoine Pitrou2010-08-091-1/+5
| | | | Interpreter Lock around all system calls. Original patch by Ryan Kelly.
* Issue 9445: Fix undefined symbols on VS8.0 build.Raymond Hettinger2010-08-011-0/+9
|
* This fixes issue7900 by adding code that dealsRonald Oussoren2010-07-231-7/+42
| | | | | | | | | 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.
* Issue #6095: Make directory argument to os.listdir optional.Martin v. Löwis2010-07-231-9/+21
| | | | Patch by Virgil Dupras.
* Re-flow several long lines from #1578269.Brian Curtin2010-07-091-11/+23
|
* Implement #1578269. Patch by Jason R. Coombs.Brian Curtin2010-07-081-20/+526
| | | | | | | | | | | | | | | | 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.
* Merged revisions 82047 via svnmerge fromSenthil Kumaran2010-06-171-1/+1
| | | | | | | | | | 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 ........
* Remove unused variable, and fix a compilation warning on Windows.Amaury Forgeot d'Arc2010-05-151-1/+1
|
* posix_listdir(), posix_readlink(): avoid temporary PyBytes objectVictor Stinner2010-05-141-38/+10
| | | | | | Use directly PyUnicode_DecodeFSDefaultAndSize() instead of PyBytes_FromStringAndSize() + PyUnicode_FromEncodedObject() if the argument is unicode.
* posix_error_with_allocated_filename() decodes the filename withVictor Stinner2010-05-081-2/+6
| | | | | | PyUnicode_DecodeFSDefaultAndSize() and call PyErr_SetFromErrnoWithFilenameObject() instead of PyErr_SetFromErrnoWithFilename()
* Replace PyUnicode_Decode(buf, strlen(buf), Py_FileSystemDefaultEncoding,Victor Stinner2010-05-071-1/+1
| | | | "surrogateescape") by PyUnicode_DecodeFSDefault(val).