search for: am_server

Displaying 20 results from an estimated 86 matches for "am_server".

Did you mean: gam_server
2007 Feb 15
2
Client can trick daemon into running server code with am_server == 0
Dear rsync people (particularly Wayne), I noticed that an rsync daemon counts on the client sending a --server option so that am_server gets set to 1. If the client doesn't supply this option, am_server remains 0 but the daemon runs start_server anyway. This is potentially dangerous and might lead to a security hole, although I haven't found one yet. I suggest that the daemon either set am_server = 1 explicitly or drop t...
2001 Nov 29
1
patch from faith@alephnull to add rate indicator to --progress
...024.0); + else if (rate > 1024) rprintf(FINFO, " %7.2fMB/s", rate/1024.0); + else rprintf(FINFO, " %7.2fKB/s", rate); + + rprintf(FINFO, (pct == 100) ? "\n" : "\r"); +} void end_progress(OFF_T size) { extern int do_progress, am_server; if (do_progress && !am_server) { - rprintf(FINFO,"%.0f (100%%)\n", (double)size); + struct timeval now; + gettimeofday(&now, NULL); + rprint_progress(size, size, &now); } - last_ofs = 0; + last_ofs = 0; + start_ofs =...
2008 Dec 15
1
rsync architecture
...am_daemon argument provided. My questions are 1. What is the roll of deamon process. How it different from server? Does it run always on remote machine? When I do rsync from client how remote deamon/server will get triggered? 2 .Where the arguments are being set. I cannot see any of arguments(like am_server, am_deamon etc) is being set anywhere. Please help me on this so that I can proceed. Thanks, Jignesh -------------- next part -------------- HTML attachment scrubbed and removed
2002 May 06
1
Prevent infinite recursion in rwrite()
...----8<---cut here--->8------>8------>8------>8--- Index: log.c --- log.c 2002/04/08 09:10:50 1.61 +++ log.c 2002/05/07 00:32:30 @@ -215,6 +215,7 @@ void rwrite(enum logcode code, char *buf, int len) { FILE *f=NULL; + static char semaphore = 0; extern int am_daemon; extern int am_server; extern int quiet; @@ -243,8 +244,11 @@ * io_multiplex_write can fail if we do not have a multiplexed * connection at the moment, in which case we fall through and * log locally instead. */ - if (am_server && io_multiplex_write(code, buf, len)) { - return; + if (am_server &&...
2004 Jul 12
2
[PATCH] Batch-mode rewrite
...================================== RCS file: /cvsroot/rsync/compat.c,v retrieving revision 1.22 diff -c -b -d -r1.22 compat.c *** compat.c 11 May 2004 17:25:01 -0000 1.22 --- compat.c 12 Jul 2004 00:37:46 -0000 *************** *** 28,33 **** --- 28,36 ---- int remote_protocol = 0; extern int am_server; + extern int am_sender; + extern int write_batch; + extern int batch_fd; extern int checksum_seed; *************** *** 73,83 **** --- 76,138 ---- exit_cleanup(RERR_PROTOCOL); } + /* CAS: I think this is a good candidate for a protocol + * change. Instead of: + * + * if...
2004 Apr 27
1
No error messages in rsyncd log in 2.6.1pre-1
...'rsync on [module] from [host]' message, there are no further entries in the rsyncd log for this timeout case. There should be an error message to indicate what happened, and when. There was a change to rwrite() that seems to be preventing the error logging. This 2.6.1 code: if (am_server) { /* Pass it to non-server side, perhaps through our sibling. */ if (msg_fd_out >= 0) { send_msg((enum msgcode)code, buf, len); return; } if (io_multiplex_write((enum msgcode)code, bu...
2006 May 13
2
using -v and -q together
...round that to check the 'quiet' variable: +++ sender.c @@ extern int verbose; +extern int quiet; @@ send_files() if (!(iflags & ITEM_TRANSFER)) { + if (!quiet) maybe_log_item(file,?iflags,?itemizing,?xname); @@ send_files() if (!do_xfers) { /* log the transfer */ - if (!am_server && log_format) + if (!am_server && log_format && !quiet) log_item(file, &stats, iflags, NULL); another way might be to update log.c and check the quiet status in there ... not quite sure how to go about this one though ... yet another way might be to just tell...
2003 Mar 08
1
[patch] rsync over existing I/O connections (new feature)
Hello, I wrote this patch that allows you to run rsync over an existing I/O connection, instead of creating a new rsh or socket connection. For example, I have a client and server that talk over ssh via a simple custom protocol. I want to use the existing ssh connection to transfer files, but I want the flexibility of rsync to do it. With this patch, I can do the following in my client
2002 May 16
1
[patch] suggestions for -v option
...-----------oOO--(_)--OOo--------------------------- -------------- next part -------------- --- rsync-2.5.5/flist.c.orig Thu Mar 14 22:20:20 2002 +++ rsync-2.5.5/flist.c Tue May 14 16:36:33 2002 @@ -72,7 +72,7 @@ static int show_filelist_p(void) { - return verbose && recurse && !am_server; + return verbose > 1 && recurse && !am_server; } static void start_filelist_progress(char *kind) --- rsync-2.5.5/main.c.orig Wed Mar 27 06:10:44 2002 +++ rsync-2.5.5/main.c Tue May 14 16:38:06 2002 @@ -118,7 +118,7 @@ (double)stats.total_read); } - if (verbose...
2004 Feb 27
2
patch: better progress meter
Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : http://lists.samba.org/archive/rsync/attachments/20040227/923b87ee/PGP.bin
2002 Jul 31
1
rsync: omit summary with a single -v
...diff -r -X /home/roderick/.diff-exclude -u rsync-2.5.5.debian/flist.c rsync-2.5.5/flist.c --- rsync-2.5.5.debian/flist.c Thu Mar 14 16:20:20 2002 +++ rsync-2.5.5/flist.c Wed Jul 31 09:13:10 2002 @@ -72,7 +72,7 @@ static int show_filelist_p(void) { - return verbose && recurse && !am_server; + return verbose > 1 && recurse && !am_server; } static void start_filelist_progress(char *kind) diff -r -X /home/roderick/.diff-exclude -u rsync-2.5.5.debian/main.c rsync-2.5.5/main.c --- rsync-2.5.5.debian/main.c Wed Mar 27 00:10:44 2002 +++ rsync-2.5.5/main.c Wed Jul 31 0...
2008 Jan 30
2
[PATCH] Fix backwards comment about logging on a local run.
--- Since the process executing the code inside the previous "if" (which doesn't close the log file) sets am_server = 1, I think the comment is backwards. pipe.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/pipe.c b/pipe.c index 12aa73d..101d4cb 100644 --- a/pipe.c +++ b/pipe.c @@ -150,7 +150,7 @@ pid_t local_child(int argc, char **argv, int *f_in, int *f_out, child_main(argc, a...
2002 Apr 03
3
metadata in dryrun mode
As I reported a while back rsync doesn't handle metadata (permissions and ownership) in dryrun mode. I offered to make a patch and that offer still stands. I didn't have the time for it until now and want to pick it up again. I had some ugly hack back then but I want to redo it in a clean way. I would like some input on my thoughts. IMHO, it would be ideally if the check for dry_run
2004 May 29
1
[patch] Filename conversion
...static gid_t gid; static char lastname[MAXPATHLEN]; - char *fname, fbuf[MAXPATHLEN]; + char fname[MAXPATHLEN]; int l1, l2; if (f == -1) @@ -351,7 +351,11 @@ void send_file_entry(struct file_struct io_write_phase = "send_file_entry"; - fname = f_name_to(file, fbuf); + if (am_server) + f_name_to(file, fname); /* fname conversion always done on client */ + else + convert_fname(fname, f_name(file), MAXPATHLEN); + flags = base_flags; @@ -563,6 +567,9 @@ void receive_file_entry(struct file_stru strlcpy(lastname, thisname, MAXPATHLEN); + if (!am_server) /* fname conv...
2004 Jan 13
3
Progress reporting: N more to check
...AY logit(LOG_INFO,"rsyncd started\n"); #endif + + stats.current_file_index = -1; } void log_open(void) --- progress.c 13 Jan 2004 05:13:57 -0000 1.5 +++ progress.c 13 Jan 2004 05:00:29 -0000 @@ -21,6 +21,7 @@ #include "rsync.h" +extern struct stats stats; extern int am_server; static OFF_T last_ofs; @@ -45,6 +46,7 @@ static unsigned long msdiff(struct timev static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now, int is_last) { + char eol[256]; int pct = (ofs == size) ? 100 : (int)((100.0*ofs)/size); unsigned long diff = msdiff(&star...
2004 Jan 27
1
Differentiating debug messages from both sides
...n char *rsync_path; extern char *shell_cmd; extern struct file_list *batch_flist; +extern char *who_am_i; + /* there's probably never more than at most 2 outstanding child processes, * but set it higher just in case. @@ -198,7 +200,7 @@ static void show_malloc_stats(void) getpid(), am_server ? "server " : "", am_daemon ? "daemon " : "", - am_sender ? "sender" : "receiver"); + who_am_i); rprintf(FINFO, " arena: %10d (bytes from sbrk)\n", mi.arena); rprintf(FINFO, " ordblks: %10d (chunks not i...
2001 Aug 06
1
merge rsync+ into rsync (was Re: rsync-2.4.7 NEWS file)
> Just curious: what about the rsync+ patch? Thanks for the reminder. I've just committed Jos's rsync+ patch onto the "branch_mbp_rsyncplus_merge" branch. If it works OK and nobody screams I will move it across onto the main tree tomorrow or Wednesday. I see the patch doesn't add documentation about the new options to the man page, so we should fix that in the future.
2004 Mar 29
1
--from-files broken with remote sources
...-from0 . which conflicts with a check in options.c that rsync must have two non-option arguments when --files-from is used. I tried again with the latest nightly (rsync-HEAD-20040329-1635GMT.tar.gz) and had the same problem. In this version, the check is at line 725. If I add "&& ! am_server", it works, but I don't know if that is the correct fix. Andrew
2003 Mar 22
2
[RFC] protocol version
I'm in the midst of coding a patch set for consideration that will bump the protocol version and have a couple of observations. The current minimum backwards-compatible protocol is 15 but we have code that checks for protocol versions as old as 12. If someone else doesn't beat me to it i'm considering cleaning out the pre-15 compatibility code. A backwards compatibility patch could
2005 Jul 26
1
[patch] paranoid checksum checking
...tten to local disk has the same + checksum as the file in the originating location. This + is a further paranoia check, just to make sure that + we really have successfully transferred the file. */ + if (recv_ok && ! am_server && always_checksum) { + char csum[MD4_SUM_LENGTH + 1]; + file_checksum (fnametmp, csum, file->length); + if (memcmp(csum, file->u.sum, MD4_SUM_LENGTH) != 0) { + rprintf (FERROR, &qu...