1 | .\" Process this file with |
---|
2 | .\" groff -man -Tascii <file> |
---|
3 | .\" |
---|
4 | .TH @PACKAGE@_fso_is_changeable 3 "2008-04-18" "version @PACKAGE_VERSION@" Subversion |
---|
5 | .SH NAME |
---|
6 | @PACKAGE@_fso_is_changeable \- test if a file or directory is |
---|
7 | changeable |
---|
8 | .SH SYNOPSIS |
---|
9 | .B #include <@PACKAGE@/fso_is_changeable.h> |
---|
10 | |
---|
11 | .BI "int @PACKAGE@_fso_is_changeable(const char* " path ");" |
---|
12 | .SH DESCRIPTION |
---|
13 | Tests if the file or directory referred to by |
---|
14 | .I path |
---|
15 | is changeable. A file or directory is considered changeable if it can |
---|
16 | be directly modified or if any component of the path can be renamed. |
---|
17 | If any component of the path refers to a symbolic link, the target is |
---|
18 | also tested. Permissions are tested against the real user and group |
---|
19 | IDs, not the effective IDs. |
---|
20 | |
---|
21 | This function is designed to help determine whether a file is safe to |
---|
22 | .BR exec (3) |
---|
23 | from a setuid/setgid binary. If this function returns true, the user |
---|
24 | may be able to start a shell as the effective user. |
---|
25 | |
---|
26 | This function is thread-safe if the user's C POSIX library is |
---|
27 | thread-safe. |
---|
28 | .SH ARGUMENTS |
---|
29 | .TP |
---|
30 | .I path |
---|
31 | Null-terminated string containing the path to the file or directory to |
---|
32 | test. |
---|
33 | .SH RETURN VALUE |
---|
34 | On success, returns 1 if the user (real user and group IDs) can change |
---|
35 | the file or directory referred to by |
---|
36 | .IR path , |
---|
37 | or 0 if the file or directory can not be changed. |
---|
38 | |
---|
39 | On error, returns 1 and sets |
---|
40 | .I errno |
---|
41 | (see |
---|
42 | .BR errno (3)). |
---|
43 | .SH ERRORS |
---|
44 | Error conditions and |
---|
45 | .I errno |
---|
46 | (see |
---|
47 | .BR errno (3)) |
---|
48 | values are described in the specifications for |
---|
49 | .BR stat "(3), " access "(3), " snprintf "(3), " lstat "(3), " readlink "(3), and " getcwd "(3)." |
---|
50 | .SH SEE ALSO |
---|
51 | .BR lib@PACKAGE@ "(3), " @PACKAGE@_exec_svnserve "(3)" |
---|
52 | .SH AUTHOR |
---|
53 | Richard Hansen <svnstsw@ir.bbn.com> |
---|
54 | .SH COPYING |
---|
55 | Copyright (c) 2008 BBN Technologies Corp. All rights reserved. |
---|
56 | |
---|
57 | Redistribution and use in source and binary forms, with or without |
---|
58 | modification, are permitted provided that the following conditions are |
---|
59 | met: |
---|
60 | .RS 0 |
---|
61 | .IP 1. 4 |
---|
62 | Redistributions of source code must retain the above copyright notice, |
---|
63 | this list of conditions and the following disclaimer. |
---|
64 | .IP 2. 4 |
---|
65 | Redistributions in binary form must reproduce the above copyright |
---|
66 | notice, this list of conditions and the following disclaimer in the |
---|
67 | documentation and/or other materials provided with the distribution. |
---|
68 | .IP 3. 4 |
---|
69 | Neither the name of BBN Technologies nor the names of its contributors |
---|
70 | may be used to endorse or promote products derived from this software |
---|
71 | without specific prior written permission. |
---|
72 | .RE |
---|
73 | |
---|
74 | THIS SOFTWARE IS PROVIDED BY BBN TECHNOLOGIES AND CONTRIBUTORS "AS IS" |
---|
75 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
---|
76 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
---|
77 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BBN TECHNOLOGIES OR |
---|
78 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
---|
79 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
---|
80 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
---|
81 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
---|
82 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
---|
83 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
---|
84 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|