search for: unsafe_symlink

Displaying 10 results from an estimated 10 matches for "unsafe_symlink".

2003 Jan 16
3
unsafe_symlink change (Re: CVS update: rsync)
The patch from 2-1/2 years ago for changing copy-unsafe-links to follow unsafe links on the destination side also included essentially this patch. When I looked at it, however, I asked why in the world is unsafe_symlink() doing strdup() in the first place. I think you could get rid of the calls to strdup() and the new local variables and possibly do a couple casts inside the function instead. - Dave On Wed, Jan 15, 2003 at 12:49:44PM -0500, wayned@samba.org wrote to rsync-cvs: > Re: CVS update: rsync >...
2009 Mar 02
2
DO NOT REPLY [Bug 6151] New: --safe-links can be fooled by adding extra slashes to the path
...ormal Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy: erik.sjolund@gmail.com QAContact: rsync-qa@samba.org The rsync option flags --copy-unsafe-links --safe-links are not working correctly. It is possible to fool the function unsafe_symlink(const char *dest, const char *src) in util.c by adding extra slashes as the following example shows: $ mkdir /tmp/a $ cd /tmp/a $ ln -s ../../etc/passwd passwd1 $ ln -s .////../../etc/passwd passwd2 $ rsync -av --safe-links /tmp/a/ /tmp/b sending incremental file list created directory /tmp/b ./...
2002 Apr 02
2
rsync 2.3.2 with --copy-unsafe-links work badly
Hello, I try use rsync from Debian 2.2 (rsync 2.3.2) to mirror Debian distribution tree. in tree is directories dists/potato/main/binary-all/ dists/potato/main/binary-i386/ pool/ In directory dists/potato/main/binary-i386/ is some files symbolic links to ../binary-all/ and some links to ../../../../pool/ In mirror I want preserve links to binary-all/ and copy as files links to pool/. I try
2008 May 08
1
Patch to not modify files in place unless "--inplace" option specified
...rator.c 2008-03-28 10:30:11.000000000 -0700 +++ rsync-3.0.2/generator.c 2008-05-07 15:35:08.317364774 -0700 @@ -1508,6 +1508,7 @@ if (preserve_links && S_ISLNK(file->mode)) { #ifdef SUPPORT_LINKS + int iflags = 0; const char *sl = F_SYMLINK(file); if (safe_symlinks && unsafe_symlink(sl, fname)) { if (verbose) { @@ -1528,7 +1529,15 @@ else if ((len = readlink(fname, lnk, MAXPATHLEN-1)) > 0 && strncmp(lnk, sl, len) == 0 && sl[len] == '\0') { /* The link is pointing to the right place. */ - set_file_attrs(fname, file, &sx,...
2003 Jan 02
2
--copy-unsafe-links, links preserved in source tree or local directory?
Hi, I'm a bit confused about what the '--copy-unsafe-links' option considers the 'source tree'. In the man page it says that for links pointing outside the 'source tree' the file will be copied, but when I try this, for all links pointing outside of the local directory the files are copied even though the links point to files that are in the directory tree that is
2004 Apr 19
3
[PATCH] time limit
...args[ac++] = "--backup-dir"; args[ac++] = backup_dir; diff -urN rsync-2.6.1pre-2/proto.h rsync-2.6.1pre-2_modified/proto.h --- rsync-2.6.1pre-2/proto.h 2004-04-14 19:33:30.000000000 -0400 +++ rsync-2.6.1pre-2_modified/proto.h 2004-04-19 16:07:57.000000000 -0400 @@ -267,6 +267,7 @@ int unsafe_symlink(const char *dest, const char *src); char *timestring(time_t t); int msleep(int t); +time_t get_rsync_start_time(void); int cmp_modtime(time_t file1, time_t file2); int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); void *_new_array(unsigned int size, unsigned long num); di...
2004 Apr 22
2
[PATCH] --timelimit and --stopat
...args[ac++] = "--backup-dir"; args[ac++] = backup_dir; diff -urN rsync-2.6.1pre-2/proto.h rsync-2.6.1pre-2_modified/proto.h --- rsync-2.6.1pre-2/proto.h 2004-04-14 19:33:30.000000000 -0400 +++ rsync-2.6.1pre-2_modified/proto.h 2004-04-22 15:36:33.000000000 -0400 @@ -267,6 +267,7 @@ int unsafe_symlink(const char *dest, const char *src); char *timestring(time_t t); int msleep(int t); +time_t get_rsync_start_time(void); int cmp_modtime(time_t file1, time_t file2); int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); void *_new_array(unsigned int size, unsigned long num); di...
2004 Apr 10
0
patches for copying atimes
...id overflow(char *str); -int set_modtime(char *fname, time_t modtime); +int set_times(char *fname, time_t modtime, time_t atime); int create_directory_path(char *fname, int base_umask); int copy_file(char *source, char *dest, mode_t mode); int robust_unlink(char *fname); @@ -268,7 +268,7 @@ int unsafe_symlink(const char *dest, const char *src); char *timestring(time_t t); int msleep(int t); -int cmp_modtime(time_t file1, time_t file2); +int cmp_time(time_t file1, time_t file2); int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); void *_new_array(unsigned int size, unsigned long n...
2004 Apr 20
1
improved atime patch
...id overflow(char *str); -int set_modtime(char *fname, time_t modtime); +int set_times(char *fname, time_t modtime, time_t atime); int create_directory_path(char *fname, int base_umask); int copy_file(char *source, char *dest, mode_t mode); int robust_unlink(char *fname); @@ -267,7 +267,7 @@ int unsafe_symlink(const char *dest, const char *src); char *timestring(time_t t); int msleep(int t); -int cmp_modtime(time_t file1, time_t file2); +int cmp_time(time_t file1, time_t file2); int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); void *_new_array(unsigned int size, unsigned long n...
2003 Oct 03
2
Cygwin/rsync Hang Problem Testing Results
People of cygwin & rsync, I recently attempted to get cygwin and rsync working to solve a backup/mirroring need in my computer life. Well, as you might guess, I ran into a little but of trouble. Strangely enough, rsync seemed to be regularly hanging when I attempted to do a "get" (sycronize a remote to a local dir). Well, considering I want to automate this, that was not going