search for: rsyserr

Displaying 20 results from an estimated 53 matches for "rsyserr".

Did you mean: syserr
2009 Mar 11
0
rsyserr is occasionally dropping receiver messages
...te (e.g. 700MB free space resulted in the error not being displayed, whereas only 300MB resulted in the error correctly being displayed), and the file already existed on the destination and was modified on the source (--no-inplace). Oddly, I can tell that the ENOSPC message is always sent to rsyserr(), it just wasn't actually printed. I added some fprintf lines to receive_data in receive.c and rsyserr in log.c (basically dumping the message that is sent to rsyserr preceded by the function name) and got this output: +receive_data(): big_file.dmg [No space left on device] +rsyserr(...
2004 Jan 26
1
patch for linux capabilities
...; char *request=NULL; +#ifdef HAVE_LINUX_CAPS + cap_t cp; + cap_value_t newcaps[2] = { CAP_SYS_CHROOT, CAP_DAC_READ_SEARCH }; +#endif extern int am_sender; extern int am_server; extern int am_daemon; @@ -373,12 +389,46 @@ } #endif +#ifdef HAVE_LINUX_CAPS + if (setreuid(uid, 0)) { + rsyserr(FERROR, errno, "setreuid(%d,0) failed", (int) uid); + io_printf(f_out, "@ERROR: setreuid failed\n"); + return -1; + } + if( prctl(PR_SET_KEEPCAPS, 1) < 0 ) { + rsyserr(FERROR, errno, "prctl failed"); + io_printf(f_out, "@ERROR: prctl failed\n");...
2010 Jun 15
3
about rsyncing of block devices
...ar *fname, goto cleanup; } + /* On Linux systems (at least), st_size is typically 0 for devices. + * If so, try to determine the actual device size. */ + if (IS_DEVICE(sx.st.st_mode) && sx.st.st_size == 0) { + int fd; + + fd = open(fname, O_RDONLY); + + if (fd < 0) + rsyserr(FERROR, errno, "failed to open %s to determine size", fname); + else { + OFF_T off = lseek(fd, 0, SEEK_END); + if (off == (OFF_T) -1) + rsyserr(FERROR, errno, "failed to seek to end of %s to determine size", fname); + else { + sx.st.st_size = off; + } + close(fd...
2011 Feb 05
2
rsync not reporting diskfull error
I am involved with the development of lbackup. This message to the rsync mailing list is related to the following thread on the lbackup-disccussion mailing list : http://tinyurl.com/lbackup-discussion-diskfull Essentially, I am curious to if any one using rsync 3.0.7 on Mac OS (10.6) Server has experienced an out of disk space error and not had a message similar to the following reported : >
2013 Jan 31
0
File descriptors in pipe.c
...one at each end for reading and writing. But in the rsync code, two pairs are created as to_child_pipe and from_child_pipe ------------------------------------------------------------ --------------------- if (fd_pair(to_child_pipe) < 0 || fd_pair(from_child_pipe) < 0) { rsyserr(FERROR, errno, "pipe"); exit_cleanup(RERR_IPC); } //to_pipe_child[]={3,4} //from_pipe_child[]={5,6} pid = do_fork(); printf("value of pid is %d",pid); if (pid == -1) { rsyserr(FERROR, errno, &qu...
2009 Oct 15
1
PATCH: --write-devices to allow synchronising to a block device
..._sum1[MAX_DIGEST_LEN]; static char file_sum2[MAX_DIGEST_LEN]; struct map_struct *mapbuf; @@ -285,10 +287,14 @@ goto report_write_error; #ifdef HAVE_FTRUNCATE - if (inplace && fd != -1 - && ftruncate(fd, offset) < 0) { - rsyserr(FERROR_XFER, errno, "ftruncate failed on %s", - full_fname(fname)); + (void)do_fstat(fd,&st); + /* Makes no sense to attempt to ftruncate() a block device: */ + if (!(IS_DEVICE(st.st_mode))) { + if (inplace && fd != -1 +...
2007 Sep 22
0
rsync build on IA64 using icc
...n in primary source file extern struct chmod_mode_struct *daemon_chmod_modes; ^ rsync.c(139): remark #981: operands are evaluated in unspecified order full_fname(fname)); ^ rsync.c(138): remark #981: operands are evaluated in unspecified order rsyserr(FERROR, errno, "stat %s failed", ^ rsync.c(158): remark #981: operands are evaluated in unspecified order full_fname(fname)); ^ rsync.c(157): remark #981: operands are evaluated in unspecified order rsyserr(FERROR, errno, "failed to set times on %s",...
2002 Nov 04
4
making --exclude-from=- read from stdin
...+ FILE *f; char line[MAXPATHLEN]; + + if( fname[0]=='-' && fname[1]=='\0'){ + f= stdin; + } + else { + f= fopen(fname,"r"); + } if (!f) { if (fatal) { rsyserr(FERROR, errno, @@ -243,7 +250,9 @@ add_exclude_list(line,&list,include); } } - fclose(f); + if( ! (fname[0]=='-' && fname[1]=='\0' )) { + fclose(f); + } return list; }
2007 Apr 03
0
Modifications to NOT recursively make_backup
...p;& S_ISDIR(file->mode)) { ! /* make an empty directory */ ! if (do_mkdir(buf, file->mode) < 0 ! && (errno != ENOENT || make_bak_dir(buf) < 0 ! || do_mkdir(buf, file->mode) < 0)) { ! rsyserr(FINFO, errno, "mkdir %s failed", ! full_fname(buf)); } - ret_code = do_rmdir(fname); - if (verbose > 2) { - rprintf(FINFO, "make_backup: RMDIR %s returns %i\n", -...
2002 Jun 21
1
small security-related rsync extension
...od(fname,new_mode) != 0) { X+ rprintf(FERROR,"chmod failed\n"); X+ return 0; X+ } X+ } X+ return 1; X+ } X+ #endif X X /* simple backup creates a backup with a suffix in the same directory */ X static int make_simple_backup(char *fname) X*************** X*** 46,54 **** X rsyserr(FERROR, errno, "rename %s to backup %s", fname, fnamebak); X return 0; X } X! } else if (verbose > 1) { X! rprintf(FINFO,"backed up %s to %s\n",fname,fnamebak); X } X return 1; X } X X--- 68,86 ---- X rsyserr(FERROR, errno, "rename %s to backup %s&qu...
2008 Oct 09
1
DO NOT REPLY [Bug 5820] New: rsync does not replace symlink atomically
...t_tmpname(fnametmp, fname)) + goto cleanup; + if (!mktemp(fnametmp)) + goto cleanup; + if (do_symlink(sl, fnametmp) != 0) { + rsyserr(FERROR_XFER, errno, "symlink %s -> \"%s\" failed", + full_fname(fnametmp), sl); + goto cleanup; + } + set_file_attrs(fnametmp, file,...
2009 Nov 04
0
PATCH: fast copy of files in local server mode
...pipe[2]; int from_child_pipe[2]; + int child_socket[2]; /* The parent process is always the sender for a local rsync. */ assert(am_sender); if (fd_pair(to_child_pipe) < 0 || +#ifdef HAVE_SOCKETPAIR + fd_pair(child_socket) < 0 || +#endif fd_pair(from_child_pipe) < 0) { rsyserr(FERROR, errno, "pipe"); exit_cleanup(RERR_IPC); @@ -141,6 +146,9 @@ if (dup2(to_child_pipe[0], STDIN_FILENO) < 0 || close(to_child_pipe[1]) < 0 || +#ifdef HAVE_SOCKETPAIR + close(child_socket[1]) < 0 || +#endif close(from_child_pipe[0]) < 0 || du...
2005 Jul 24
2
[Bug 2868] Allow fifos to be copied by normal users
https://bugzilla.samba.org/show_bug.cgi?id=2868 ------- Additional Comments From rsync@cpe-24-95-91-210.columbus.res.rr.com 2005-07-23 23:36 ------- this should apply to both fifos and sockets. creation of both are unprivileged operations, see mkfifo(2), socket(2)/bind(2) on freebsd. suggest moving/modifying do_mknod in these sections backup.c generator.c to run regardles of uid and simply
2002 Aug 02
1
[patch] exclude-from stdin
...int fatal, int include) { struct exclude_struct **list=list1; - FILE *f = fopen(fname,"r"); + FILE *f; char line[MAXPATHLEN]; + + if (strcmp(fname, "-")) { + f = fopen(fname,"r"); + } else { + f = fdopen(0, "r"); + } if (!f) { if (fatal) { rsyserr(FERROR, errno, Index: rsync.yo =================================================================== RCS file: /cvsroot/rsync/rsync.yo,v retrieving revision 1.105 diff -u -r1.105 rsync.yo --- rsync.yo 1 Aug 2002 17:55:40 -0000 1.105 +++ rsync.yo 3 Aug 2002 00:09:55 -0000 @@ -617,6 +617,8 @@ option,...
2010 Nov 09
5
Changes made to main.c on implementing real time Rsync
.../* If the destination is a dir, enter it and use mode 1. */ if (S_ISDIR(st1.st_mode)) { pFound = pFound + 1; continue; } } if( mkdir_defmode( parentFolder ) != 0 ) { rsyserr(FERROR, errno, "mkdir recursive parent folder %s for child folder %s failed", full_fname(parentFolder), full_fname(dest_path)); exit_cleanup(RERR_FILEIO); } pFound = pFound + 1; } if( mkdir_defmode( dest...
2012 Feb 18
4
FADV_DONTNEED support
While going through an old todo list I found that these patches had fallen by the way-side. About a year ago I initiated a discussion[1] with the Linux kernel folks regarding the lack of any useable fadvise support on the kernel side. As a result, I was observing extremely poor performance on my server after backup as executable pages were being swapped out in favor of data waiting to be flushed
2009 Mar 25
1
Pipe creation problem: From Java app using rsync + ssh on windows with cygwin
...nt.rsync.StreamGobbler - rsync error: error in IPC code (code 14) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/pipe.c(57) [sender=3.0.4] * The rsync code where the error happens is pipe.c(57) which is this. if (fd_pair(to_child_pipe) < 0 || fd_pair(from_child_pipe) < 0) { rsyserr(FERROR, errno, "pipe"); exit_cleanup(RERR_IPC); } So for some reason fd_pair(to_child_pipe) is < 0 or fd_pair(from_child_pipe) < 0. If anyone has any suggestions it would be great as I'm stuck now. Thanks, Derek -------------- next part -------------- HTML attachme...
2006 Feb 20
1
Improved diagnostics patch
...g at meta-dynamic dot com http://meta-dynamic.com The patch: --- socket.c.~1.116.~ 2006-02-03 13:46:38.000000000 -0500 +++ socket.c 2006-02-20 07:18:11.000000000 -0500 @@ -364,6 +364,7 @@ resp->ai_protocol); if (s == -1) { + rsyserr(FERROR, errno, "socket(%d,%d)", resp->ai_family, resp->ai_protocol ); /* See if there's another address that will work... */ continue; } @@ -385,6 +386,7 @@ /* Now we've got a socket - we need to...
2020 Jun 10
2
Delta-compression and --write-devices
...e in receiver.c to compensate for this: /* On Linux systems (at least), st_size is typically 0 for devices. * If so, try to determine the actual device size. */ if (fd1 != -1 && IS_DEVICE(st.st_mode) && st.st_size == 0) { OFF_T off = lseek(fd1, 0, SEEK_END); if (off == (OFF_T) -1) rsyserr(FERROR, errno, "failed to seek to end of %s to determine size", fname); else { st.st_size = off; off = lseek(fd1, 0, SEEK_SET); if (off != 0) rsyserr(FERROR, errno, "failed to seek back to beginning of %s to read it", fname); } } However this code seems to be missing in gener...
2002 Feb 20
2
[PATCH] rsync on cygwin - textmode config files
...e.c Tue Feb 19 14:04:36 2002 @@ -82,13 +82,24 @@ static int get_secret(int module, char * if (!fname || !*fname) return 0; - fd = open(fname,O_RDONLY); + fd = open(fname,O_RDONLY +#ifdef __CYGWIN__ + | O_TEXT +#endif + ); if (fd == -1) return 0; if (do_stat(fname, &st) == -1) { rsyserr(FERROR, errno, "stat(%s)", fname); ok = 0; } else if (lp_strict_modes(module)) { +/* Under CYGWIN, we don't want to force attribute check. It can be made to + work if env var CYGWIN contains "ntea" (nt extended attribute mode), but + frankly, it is a MAJOR pain in t...