mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-09-08 11:22:14 -04:00
Document unsafe_symlink().
This commit is contained in:
1 parent
ac13ad106a
commit
036e70b024
1 file changed
+12
@@ -985,6 +985,18 @@ void show_progress(OFF_T ofs, OFF_T size)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if a symlink points outside the current directory tree.
|
* Determine if a symlink points outside the current directory tree.
|
||||||
|
* This is considered "unsafe" because e.g. when mirroring somebody
|
||||||
|
* else's machine it might allow them to establish a symlink to
|
||||||
|
* /etc/passwd, and then read it through a web server.
|
||||||
|
*
|
||||||
|
* @param dest Target of the symlink in question.
|
||||||
|
*
|
||||||
|
* @src src Top source directory currently applicable. Basically this
|
||||||
|
* is the first parameter to rsync in a simple invocation, but it's
|
||||||
|
* modified as topsrcname in slightly complex ways.
|
||||||
|
*
|
||||||
|
* @retval True if unsafe
|
||||||
|
* @retval False is unsafe
|
||||||
**/
|
**/
|
||||||
int unsafe_symlink(char *dest, char *src)
|
int unsafe_symlink(char *dest, char *src)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user