summaryrefslogtreecommitdiff
path: root/Doc/library/netrc.rst
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-09-17 21:28:17 -0400
committerR David Murray <rdmurray@bitdance.com>2013-09-17 21:28:17 -0400
commit4750fa8369407a2a77d40f5aa3e681e80ca08f42 (patch)
treefc36fa0a52f36670eece4bf9deb32c4e83066ec4 /Doc/library/netrc.rst
parent935349406aeb9d43fecea447f0309ce63ed3a406 (diff)
parentfb9dc0b3ae1e048c89988fcf4c570cd73da2f455 (diff)
downloadcpython-git-4750fa8369407a2a77d40f5aa3e681e80ca08f42.tar.gz
Merge #14984: On POSIX, enforce permissions when reading default .netrc.
Diffstat (limited to 'Doc/library/netrc.rst')
-rw-r--r--Doc/library/netrc.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/netrc.rst b/Doc/library/netrc.rst
index 3f38cbce7a..23ffed69eb 100644
--- a/Doc/library/netrc.rst
+++ b/Doc/library/netrc.rst
@@ -22,6 +22,14 @@ the Unix :program:`ftp` program and other FTP clients.
no argument is given, the file :file:`.netrc` in the user's home directory will
be read. Parse errors will raise :exc:`NetrcParseError` with diagnostic
information including the file name, line number, and terminating token.
+ If no argument is specified on a POSIX system, the presence of passwords in
+ the :file:`.netrc` file will raise a :exc:`NetrcParseError` if the file
+ ownership or permissions are insecure (owned by a user other than the user
+ running the process, or accessible for read or write by any other user).
+ This implements security behavior equivalent to that of ftp and other
+ programs that use :file:`.netrc`.
+
+ .. versionchanged:: 3.4 Added the POSIX permission check.
.. exception:: NetrcParseError