diff options
author | Fred Drake <fdrake@acm.org> | 2002-06-18 16:15:51 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-06-18 16:15:51 (GMT) |
commit | 7f591246936a5a2b763851e3cb866be44a321d50 (patch) | |
tree | e59b0311f4628ac2fdaa8401c310c0b392f9744c /Doc | |
parent | ae39ddd628ace75e48d90e33b8aa5fd351dad24e (diff) | |
download | cpython-7f591246936a5a2b763851e3cb866be44a321d50.zip cpython-7f591246936a5a2b763851e3cb866be44a321d50.tar.gz cpython-7f591246936a5a2b763851e3cb866be44a321d50.tar.bz2 |
Clarified documentation for os.access().
Patch contributed by Sean Reifschneider.
Closes SF patch #570618.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libos.tex | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex index 02f44ce..f234e13 100644 --- a/Doc/lib/libos.tex +++ b/Doc/lib/libos.tex @@ -568,11 +568,13 @@ Availability: Windows. \subsection{Files and Directories \label{os-file-dir}} \begin{funcdesc}{access}{path, mode} -Check read/write/execute permissions for this process or existence of -file \var{path}. \var{mode} should be \constant{F_OK} to test the -existence of \var{path}, or it can be the inclusive OR of one or more -of \constant{R_OK}, \constant{W_OK}, and \constant{X_OK} to test -permissions. Return \code{1} if access is allowed, \code{0} if not. +Use the real uid/gid to test for access to \var{path}. Note that most +operations will use the effective uid/gid, therefore this routine can +be used in a suid/sgid environment to test if the invoking user has the +specified access to \var{path}. \var{mode} should be \constant{F_OK} +to test the existence of \var{path}, or it can be the inclusive OR of +one or more of \constant{R_OK}, \constant{W_OK}, and \constant{X_OK} to +test permissions. Return \code{1} if access is allowed, \code{0} if not. See the \UNIX{} man page \manpage{access}{2} for more information. Availability: \UNIX, Windows. \end{funcdesc} |