search for: do_rename

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

Did you mean: dn_rename
2004 Feb 17
1
[patch] Make robust_rename() handle EXDEV.
...up.c -15 +2 rsync.c -9 +33 util.c -------------- next part -------------- patchwork diff util.c --- util.c 2004-02-17 09:58:44.000000000 -0500 +++ util.c 2004-02-17 10:21:22.000000000 -0500 @@ -355,16 +355,40 @@ int robust_rename(char *from, char *to) { -#ifndef ETXTBSY - return do_rename(from, to); -#else - int rc = do_rename(from, to); - if (rc == 0 || errno != ETXTBSY) - return rc; - if (robust_unlink(to) != 0) - return -1; - return do_rename(from, to); + int do_copy = 0, tries = 4, rc; + STRUCT_STAT st; + while (tries--) { + if (do_copy) { + rc = copy_file(from, to, st.st_m...
2006 May 04
6
DO NOT REPLY [Bug 3752] New: rsync unusable with EncFS filesystem
https://bugzilla.samba.org/show_bug.cgi?id=3752 Summary: rsync unusable with EncFS filesystem Product: rsync Version: 2.6.8 Platform: x86 OS/Version: Linux Status: NEW Severity: critical Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy: micheala@jacey.org
2009 Feb 12
2
[patch] hard link protocol extension for sftp
...; known = 1; + } else if (strcmp(name, "link at openssh.com") == 0 && + strcmp(value, "1") == 0) { + exts |= SFTP_EXT_LINK; + known = 1; } if (known) { debug2("Server supports extension \"%s\" revision %s", @@ -731,6 +736,39 @@ do_rename(struct sftp_conn *conn, char * newpath, fx2txt(status)); return(status); +} + +int +do_link(struct sftp_conn *conn, char *oldpath, char *newpath) +{ + Buffer msg; + u_int status, id; + + buffer_init(&msg); + + /* Send link request */ + id = conn->msg_id++; + if ((conn->exts &am...
2002 Jan 07
0
rsync-2.5.1 / updated syscall.c "const" patch
...{ if (flags != O_RDONLY) { if (dry_run) return -1; @@ -90,7 +93,7 @@ return open(pathname, flags, mode); } -#if HAVE_CHMOD +#ifdef HAVE_CHMOD int do_chmod(const char *path, mode_t mode) { if (dry_run) return 0; @@ -99,14 +102,14 @@ } #endif -int do_rename(char *fname1, char *fname2) +int do_rename(const char *fname1, const char *fname2) { if (dry_run) return 0; CHECK_RO return rename(fname1, fname2); } -int do_mkdir(char *fname, mode_t mode) +int do_mkdir(const char *fname, mode_t mode) { if (dry_run) retur...
2005 Nov 19
3
Permissions problem I don't understand
I am try to use rsync from my windows box (under cygwin) to back up "My Documents" on to a debian server (known on my home network as roo.home) running rsyncd from inetd where it is run as root. my rsyncd.conf file sets the gid and uid to user backup.backup thusly:- syslog facility = daemon uid = backup gid = backup hosts allow = 192.168.0.0/24 hosts deny = 0.0.0.0/0 timeout = 600
2008 Feb 15
4
Revised flags patch
...xt part -------------- diff -brpu rsync-3.0.0pre9/backup.c rsync-3.0.0pre9-flags/backup.c --- rsync-3.0.0pre9/backup.c Mon Sep 24 00:19:55 2007 +++ rsync-3.0.0pre9-flags/backup.c Fri Feb 15 19:33:09 2008 @@ -61,7 +61,17 @@ static int make_simple_backup(const char return 0; while (1) { - if (do_rename(fname, fnamebak) == 0) { +#ifdef SUPPORT_FLAGS + STRUCT_STAT st2; + + link_stat(fname, &st2, 0); + make_mutable(fname, st2.st_mode, st2.st_flags); +#endif + if (do_rename(fname, fnamebak) == 0) + { +#ifdef SUPPORT_FLAGS + undo_make_mutable(fnamebak, st2.st_mode, st2.st_flags); +#en...
2008 Oct 09
1
DO NOT REPLY [Bug 5820] New: rsync does not replace symlink atomically
...\" failed", + full_fname(fnametmp), sl); + goto cleanup; + } + set_file_attrs(fnametmp, file, NULL, NULL, 0); + if (do_rename(fnametmp, fname) != 0) { + rsyserr(FERROR_XFER, errno, "rename %s -> %s failed", + full_fname(fnametmp), full_fname(fname)); + goto cleanup; +...
2007 Nov 16
0
Symbian s60v3 port (1/2 working?)
...clean for easier merging, but of course this got lost along the way. many debugging lines are still in the snapshot too. I'm not sure when/if I'll have the time to clean this up to a mergable level :( Also, I found that using the rename() system call can send the daemon into lala land. So do_rename() now does a copy_file()/unlink() combination for symbian. Nasty stuff but atleast it doesn't halt the daemon anymore and you don't have to use --inplace when transferring to the phone. Also just in case I forget, getaddrinfo() is broken on openc (from what I can tell) so I have created a...
2004 Apr 11
1
fchmod in do_mkstemp? (patch included)
...part -------------- Index: proto.h =================================================================== RCS file: /cvsroot/rsync/proto.h,v retrieving revision 1.185 diff -u -w -r1.185 proto.h --- proto.h 27 Mar 2004 09:44:34 -0000 1.185 +++ proto.h 10 Apr 2004 23:48:36 -0000 @@ -222,7 +222,7 @@ int do_rename(char *fname1, char *fname2); void trim_trailing_slashes(char *name); int do_mkdir(char *fname, mode_t mode); -int do_mkstemp(char *template, mode_t perms); +int do_mkstemp(char *template); int do_stat(const char *fname, STRUCT_STAT *st); int do_lstat(const char *fname, STRUCT_STAT *st); int do...
2008 Mar 04
1
Several changes missing from [HEAD] fileflags.diff
...ev); > int do_rmdir(const char *pathname); > int do_open(const char *pathname, int flags, mode_t mode); > -int do_chmod(const char *path, mode_t mode); > +int do_chmod(const char *path, mode_t mode, uint32 fileflags); > +int do_chflags(const char *path, uint32 fileflags); > int do_rename(const char *fname1, const char *fname2); > void trim_trailing_slashes(char *name); > int do_mkdir(char *fname, mode_t mode); > @@ -326,7 +329,7 @@ int fd_pair(int fd[2]); > void print_child_argv(const char *prefix, char **cmd); > NORETURN void out_of_memory(const char *str); >...