fix from john arbash-meinel for the stub sftp server's default open mode
This commit is contained in:
Robey Pointer 2006-09-07 19:28:16 -07:00
parent 682185bac1
commit 305a4ae417
1 changed files with 3 additions and 1 deletions

View File

@ -97,7 +97,9 @@ class StubSFTPServer (SFTPServerInterface):
if mode is not None:
fd = os.open(path, flags, mode)
else:
fd = os.open(path, flags)
# os.open() defaults to 0777 which is
# an odd default mode for files
fd = os.open(path, flags, 0666)
except OSError, e:
return SFTPServer.convert_errno(e.errno)
if (flags & os.O_CREAT) and (attr is not None):