search for: orig_umask

Displaying 20 results from an estimated 34 matches for "orig_umask".

2003 Jan 02
3
Not preserving permissions really preserves some
...uggested solution: I don't think changing the way permissions are created would be that backward-compatible, so maybe a new option? Create an option: --ignore-permissions in receive_file_entry(), in filelist.c ========== code block ==================== if (!preserve_perms) { extern int orig_umask; /* set an appropriate set of permissions based on original permissions and umask. This emulates what GNU cp does */ file->mode &= ~orig_umask; <-- change this to line below file->mode = ((ignore_perms?0:0666) | file->mode) & ~orig_umask; } I used 06...
2003 Apr 24
1
Trailing slash in destination
Good afternoon all, I'm currently working on a backup script that will fetch a set of logs from remote machines and store them on a central machine. The command I'm using is of the form ${RSYNC} -avz root@${site}:/data/access_* ${LOG_REPOSITORY}/${site}/ Each site usually holds about 8 files with the prefix "access_". Some machines however only have one, and this is where my
2005 Jul 26
1
[patch] paranoid checksum checking
...ion. Regards, Nick. -------------- next part -------------- *** rsync-2.6.6pre1/receiver.c 2005-04-14 02:42:13.000000000 +0100 --- rsync-new/receiver.c 2005-07-26 18:06:56.000000000 +0100 *************** extern int module_id; *** 46,51 **** --- 46,52 ---- extern int ignore_errors; extern int orig_umask; extern int keep_partial; + extern int always_checksum; extern int checksum_seed; extern int inplace; extern int delay_updates; *************** int recv_files(int f_in, struct file_lis *** 649,654 **** --- 650,669 ---- exit_cleanup(RERR_FILEIO); } + /* Check that...
2004 Apr 27
1
[PATCH] Inplace option for rsync
...args[ac++] = tmpdir; diff -Naur rsync-2.6.1pre2/receiver.c rsync-inplace/receiver.c --- rsync-2.6.1pre2/receiver.c 2004-03-24 03:50:40.000000000 +1100 +++ rsync-inplace/receiver.c 2004-04-22 09:16:47.000000000 +1000 @@ -45,6 +45,7 @@ extern int module_id; extern int ignore_errors; extern int orig_umask; +extern int inplace; static void delete_one(char *fn, int is_dir) { @@ -226,6 +227,7 @@ full_fname(fname), strerror(errno)); exit_cleanup(RERR_FILEIO); } + offset += i; continue;...
2003 Nov 17
0
[PATCH] --source-filter && --dest-filter for rsync 2.5.6
...ommand); + } + + if (pipe(pipefds) < 0) { + rprintf(FERROR, "pipe: %s\n", strerror(errno)); + exit_cleanup(RERR_IPC); + } + + pid = fork(); + if (pid == -1) { + rprintf(FERROR, "fork: %s\n", strerror(errno)); + exit_cleanup(RERR_IPC); + } + + if (pid == 0) { + extern int orig_umask; + if (dup2(pipefds[0], STDIN_FILENO) < 0) { + rprintf(FERROR, "Failed dup2 to child stdin : %s\n", + strerror(errno)); + exit_cleanup(RERR_IPC); + } + if (dup2(out, STDOUT_FILENO) < 0) { + rprintf(FERROR, "Failed dup2 to child stdout : %s\n", + strerror(err...
2004 Jun 17
1
[PATCH] make write_batch local
...erator.c 11 Jun 2004 07:40:51 -0000 1.87 --- b/generator.c 17 Jun 2004 04:01:55 -0000 *************** *** 48,53 **** --- 48,54 ---- extern int local_server; extern int read_batch; extern int write_batch; + extern int read_batch; extern int list_only; extern int only_existing; extern int orig_umask; *************** *** 124,132 **** /* * set (initialize) the size entries in the per-file sum_struct ! * calulating dynamic block ans checksum sizes. * ! * This is only called from generate_and_send_sums() but is a seperate * function to encapsulate the logic. * * The block si...
2003 Feb 01
0
Fw: Re: [Apt-rpm] I: [PATCH] 0.5.4cnc9: rsync method support
...&apt_support, 0, 0, 0 }, {0,0,0,0, 0, 0, 0} }; --- rsync-2.5.6/receiver.c.orig 2003-01-21 02:32:17 +0300 +++ rsync-2.5.6/receiver.c 2003-01-28 17:41:54 +0300 @@ -319,6 +319,7 @@ int recv_files(int f_in,struct file_list extern int preserve_perms; extern int delete_after; extern int orig_umask; + extern int apt_support; struct stats initial_stats; if (verbose > 2) { @@ -444,6 +445,12 @@ int recv_files(int f_in,struct file_list cleanup_set(fnametmp, fname, file, buf, fd1, fd2); + if (apt_support) { + rprintf(FINFO,"Tmp-Filename: %s\n",fnametmp); + rpri...
2006 Mar 20
1
Rsync acl patch 1.113 compilation problems on cygwin
Hi, Recently, there have been some fundamental achievements regarding acl-support on the cygwin platform. I thought that it would be convenient to offer an acl-patch enabled rsync as a part of the cwrsync package (a yet another minimalist rsync on cygwin solution). I get some compilation errors. What I did: - Downloaded acl patch v1.113 from rsync site - Run commands below In the rsync source
2003 Jan 18
1
possible typo/bug in receiver.c
...es parent directories will already exist because their information should have been previously transferred, but that may not be the case with -R */ if (fd2 == -1 && relative_paths && errno == ENOENT && create_directory_path(fnametmp, orig_umask) == 0) { strlcpy(fnametmp, template, sizeof(fnametmp)); fd2 = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS); } if (fd2 == -1) { rprintf(FERROR,"cannot create %s : %s\n",fnametmp,strerror(errno)); r...
2006 Feb 24
2
DO NOT REPLY [Bug 3549] New: rsync applies umask to some directories even when a default ACL takes effect
...irectory outside the transfer, is to set the umask back to the original umask temporarily and pass 0777 to mkdir. The patch I will soon attach factors this technique out into a function do_mkdir_defmode in util.c and changes both the current get_local_name code and calls to do_mkdir(x, 0777 & ~orig_umask) to calls to do_mkdir_defmode(x). Even though the patch is only needed in the presence of ACLs, it does not mention ACLs itself, so it can be applied to the trunk. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You a...
2006 Apr 26
2
--link-dest and file/dir transfer to remote rsync daemon
Hi NG, I want to do incremental backups to a remote server running rsyncd (because daemonless transfer via ssh often hangs!). In contrast to transfer via ssh (without remote rsyncd) this doesn't seem possible, or do I miss something? Imagine I want to incrementally backup `mydir' to the backup space `backup' on e remote server `alpha' running an rsync daemon. rsyncd on
2003 Nov 17
1
rsync --daemon and logfile that can't be created
...e) { log_open(); - return; + if (logfile) + return; + /* fall back to syslog if opening log file fails */ } - logfname = NULL; + logfname = NULL; } #ifdef LOG_NDELAY @@ -191,6 +193,12 @@ int old_umask = umask(022 | orig_umask); logfile = fopen(logfname, "a"); umask(old_umask); + if (!logfile) { + char buf[512]; + sprintf(buf, "logfile %.400s could not be opened, errno %d", logfname, errno); + logfname = NULL; +...
2004 Apr 27
1
rsync-2.6.1 close() fixes
...paranoids. -- -------------- next part -------------- --- rsync-2.6.1/receiver.c.bak 2004-03-23 18:50:40.000000000 +0200 +++ rsync-2.6.1/receiver.c 2004-04-27 19:11:46.000000000 +0300 @@ -45,6 +45,7 @@ extern int cleanup_got_literal; extern int module_id; extern int ignore_errors; extern int orig_umask; +extern int do_fsync; static void delete_one(char *fn, int is_dir) { @@ -268,6 +269,12 @@ static int receive_data(int f_in,struct exit_cleanup(RERR_FILEIO); } + if (do_fsync && (fd != -1) && (fsync(fd) != 0)) { + rprintf(FERROR, "fsync failed on %s: %s\n", +...
2004 Apr 11
1
fchmod in do_mkstemp? (patch included)
...SPERMS); + fd2 = do_mkstemp(fnametmp); /* in most cases parent directories will already exist * because their information should have been previously @@ -432,7 +432,7 @@ if (fd2 == -1 && relative_paths && errno == ENOENT && create_directory_path(fnametmp, orig_umask) == 0) { strlcpy(fnametmp, template, sizeof fnametmp); - fd2 = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS); + fd2 = do_mkstemp(fnametmp); } if (fd2 == -1) { rprintf(FERROR, "mkstemp %s failed: %s\n", Index: syscall.c ========================================...
2002 Dec 23
3
rsync 2.5.5 SCO Unixware patch
...-struct file_list *flist_new() +struct file_list *flist_new(void) { struct file_list *flist; --- log.c.orig Mon Dec 23 21:51:47 2002 +++ log.c Mon Dec 23 21:51:54 2002 @@ -183,7 +183,7 @@ #endif } -void log_open() +void log_open(void) { if (logfname && !logfile) { extern int orig_umask; @@ -193,7 +193,7 @@ } } -void log_close() +void log_close(void) { if (logfile) { fclose(logfile); --- popt/popt.c.orig Mon Dec 23 21:51:59 2002 +++ popt/popt.c Mon Dec 23 21:59:21 2002 @@ -443,9 +443,10 @@ } /* Make a copy we can hack at */ - localOptString = optString...
2004 Apr 15
0
Multiple compare-dest args
...e,sum,st->st_size); return memcmp(sum, file->u.sum, protocol_version < 21 ? 2 @@ -270,7 +270,7 @@ int statret; char *fnamecmp; char fnamecmpbuf[MAXPATHLEN]; - extern char *compare_dest; + extern char *compare_dest[]; extern int list_only; extern int only_existing; extern int orig_umask; @@ -408,11 +408,15 @@ fnamecmp = fname; - if (statret == -1 && compare_dest != NULL) { + if (statret == -1 && compare_dest[0] != NULL) { /* try the file at compare_dest instead */ int saveerrno = errno; - pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, compare_dest, fname);...
2023 Jul 03
0
[PATCH] Add option --log-after to log after moving file into place
...++ main.c | 7 +++++++ options.c | 20 +++++++++++++++++++- receiver.c | 9 ++++++++- rsync.1.md | 1 + rsync.h | 3 ++- 6 files changed, 46 insertions(+), 3 deletions(-) diff --git a/log.c b/log.c index e4ba1cce..a973b519 100644 --- a/log.c +++ b/log.c @@ -47,6 +47,7 @@ extern mode_t orig_umask; extern char *auth_user; extern char *stdout_format; extern char *logfile_format; +extern char *logafter_format; extern char *logfile_name; #ifdef ICONV_CONST extern iconv_t ic_chck; @@ -271,6 +272,8 @@ void rwrite(enum logcode code, const char *buf, int len, int is_utf8) * that the msg g...
2009 Nov 04
0
PATCH: fast copy of files in local server mode
...nd a file-list index using a byte-reduction method. */ void write_ndx(int f, int32 ndx) { diff -au rsync-3.0.6/pipe.c rsync-3.0.6.fast/pipe.c --- rsync-3.0.6/pipe.c 2009-01-17 23:41:35.000000000 +0200 +++ rsync-3.0.6.fast/pipe.c 2009-09-23 14:40:42.000000000 +0300 @@ -29,6 +29,7 @@ extern mode_t orig_umask; extern char *logfile_name; extern struct chmod_mode_struct *chmod_modes; +int local_socket = 0; /** * Create a child connected to us via its stdin/stdout. @@ -111,11 +112,15 @@ pid_t pid; int to_child_pipe[2]; int from_child_pipe[2]; + int child_socket[2]; /* The parent process is...
2005 Nov 01
2
request: add TCP buffer options to rsync CLI?
Dear rsync folks, I'd like to request/suggest that cli options to set TCP send/receive buffers be added to rsync client-side. Summary: I'm aware that a daemon's config-file can set socket options for the server side (e.g. SO_SNDBUF, SO_RCVBUF). That is useful. But when trying to get high-throughput rsync over long paths (i.e. large bandwidth*delay product), since
2015 Jul 11
2
C coding tips please / Localisation
...e becomes as follows. extern struct filter_list_struct daemon_filter_list; uid_t our_uid; int am_receiver = 0; /* Only set to 1 after the receiver/generator fork. */ int am_generator = 0; /* Only set to 1 after the receiver/generator fork. */ int local_server = 0; int daemon_over_rsh = 0; mode_t orig_umask = 0; int batch_gen_fd = -1; /* Following line added for Localisation. */ #define _(String) gettext (String) /* There's probably never more than at most 2 outstanding child processes, * but set it higher, just in case. */ #define MAXCHILDPROCS 7 In the "main" function I modified th...