search for: am_daemon

Displaying 20 results from an estimated 43 matches for "am_daemon".

2002 Jul 06
1
[PATCH] Infinite recursion in rsync --server
...%s(%d)\n") at log.c:324 [...] This continues until the server kills the out-of-control process due to lack of memory, obviously making everything else on the server unhappy for a while in the process. rwrite () knows about this possible recursion, but only handles it properly with "am_daemon". This bug is present in at least 2.5.4 and 2.5.5. The simple attached patch fixes this, and patches cleanly against either. If for some reason the MIME gets eaten, you can also pick it up from: https://www.die.net/tmp/50dff5d6fd24afd8e731eb2fa3f86556/rsync-2.5.4-oom.patch...
2002 May 06
1
Prevent infinite recursion in rwrite()
...------8<------8<------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...
2004 Apr 27
1
No error messages in rsyncd log in 2.6.1pre-1
...g_error_fd != -1) { err_list_add(code, buf, len); err_list_push(); return; } /* next, if we are a server but not in daemon mode, and multiplexing * is enabled, pass it to the other side. */ if (am_server && !am_daemon && io_multiplex_write(code, buf, len)) { return; } so it looks like there's a missing !am_daemon in the newer code, and this problem probably existed in 2.6.0, but I hadn't run into this timeout problem in the past few months to notice it. In any case, shou...
2002 Feb 24
2
Write-only option
...fer_logging, transfer_logging) diff -urN rsync-2.5.2.orig/main.c rsync-2.5.2/main.c --- rsync-2.5.2.orig/main.c Fri Jan 25 11:07:41 2002 +++ rsync-2.5.2/main.c Sat Feb 23 13:49:38 2002 @@ -306,10 +306,19 @@ extern int relative_paths; extern int recurse; extern int remote_version; + extern int am_daemon; + extern int module_id; + extern int am_sender; if (verbose > 2) rprintf(FINFO,"server_sender starting pid=%d\n",(int)getpid()); + if (am_daemon && lp_write_only(module_id) && am_sender) { + rprintf(FERROR,"ERROR: module is write only\n"); + exit_cle...
2008 Dec 15
1
rsync architecture
...} else { call send_filter_list : exclude.c call recv_file_list : flist.c call do_recv : main.c call recv_files : receiver.c call generate files : generator.c } I have noticed that deamon process will start only if 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...
2004 Jan 06
2
[patch] making rsync less verbose
...flist->count, flist->count == 1 ? " " : "s "); } void show_flist_stats(void) -------------- next part -------------- --- rsync-2.6.0/main.c.orig 2003-12-20 17:57:24.000000000 +0100 +++ rsync-2.6.0/main.c 2004-01-06 17:10:19.000000000 +0100 @@ -32,6 +32,7 @@ extern int am_daemon; extern int verbose; extern int protocol_version; +extern int show_speedup; /* there's probably never more than at most 2 outstanding child processes, * but set it higher just in case. @@ -146,7 +147,7 @@ (double)stats.total_read); } - if (verbose || do_stats) { + if (show_speedu...
2002 Oct 21
0
daemon and absolute sym-links
I THINK I've found a bug in rsync. When running an rsync daemon, absolute sym-links are not created correctly on the daemon end; the leading 'slash' is stripped off. To 'fix' this behavior, the following 3 changes can be made (to version 2.5.5): flist.c:63 add: extern int am_daemon; flist.c:538 (was 537) modify: if (sanitize_paths && !am_daemon) { config.h:316 modify: #define RSYNC_VERSION "2.5.6" I'm incredibly busy (aren't we all....) and don't currently have time to research how to do an 'official' patch, or how to submit official f...
2004 Jan 14
1
rsyncd bug for sym-links
...to rsync sym-links in 'non-daemon mode' and it appears to work fine. Although I'm pretty certain of the fix for daemon rsync, I am unsure if my fix affects non-daemon operation..... At any rate, for your consideration, here is the description of the fix: flist.c:63 add: extern int am_daemon; flist.c:531 (was 530) modify: if (sanitize_paths && !am_daemon) { ======================= Kirby Bakken ESW Build Architect Rochester, MN email: kirbyb@us.ibm.com ezpage:kirbyb 507-253-4549 / Tie: 553-4549 Fax: 507-253-3495 ......one more straw can't possibly matter....
2004 Jan 19
1
File that "vanish"es between readdir and stat is not IO error
Using rsync 2.6.0 with --verbose and doing a pull. >?receiving file list ... readlink "{FILENAME}" failed: >?No such file or directory >?done >?IO error encountered - skipping file deletion The file was a temporary file that was being deleted just as the rsync was run. So while the file list was being built, it was there when the directory was read but had vanished by the
2023 Jul 03
0
[PATCH] Add option --log-after to log after moving file into place
...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 gets logged and then sent to stderr after that. */ if (am_daemon > 0 && code != FCLIENT) code = FLOG; + } else if (code == FLOG_AFTER) { + code = FLOG; } else if (send_msgs_to_gen) { assert(!is_utf8); /* Pass the message to our sibling in native charset. */ @@ -813,6 +816,12 @@ void log_item(enum logcode code, struct file_struct *file, in...
2006 Sep 18
1
code 23 error.
...*******************snip********************************** static void do_server_sender(int f_in, int f_out, int argc, char *argv[]) { struct file_list *flist; char *dir = argv[0]; if (verbose > 2) { rprintf(FINFO, "server_sender starting pid=%ld\n", (long)getpid()); } if (am_daemon && lp_write_only(module_id)) { rprintf(FERROR, "ERROR: module is write only\n"); exit_cleanup(RERR_SYNTAX); return; } if (am_daemon && lp_read_only(module_id) && remove_sent_files) { rprintf(FERROR, "ERROR: --remove-sent-files cannot be used wi...
2004 Apr 07
2
--suffix problem - possibly bug?
I'm having an issue with the --suffix and -b flags - I've tried the following commands: rsync -avbr --backup-dir=/rsyncbackup rsynctest user@server.com::module rsync -avbr --backup-dir=/rsyncbackup --suffix="" rsynctest user@server.com::module and either way, I wind up with a tilde as a suffix on all the files moved into the backup directory at time of synchronization.
2004 May 09
2
2.6.2 not displaying permissions errors on client side
Hello, Noticed this (bug?) while testing out rsync. For a little background, I need to push files real-time to some front-end servers, and I am thinking of switching from some custom shell scripts that do this job to rsync. I am thinking of running rsync as a daemon on the front-end servers, and doing an upload from the back-end server to push the data out as it comes in. So, here is the deal:
2004 Jan 28
1
rsync error using ssh : @ERROR: access denied to server.domain.com from unknown (0.0.0.0) {Scanned By MailScanner}
I use rsync to mirror several servers. I run RH7.3 My rsyncd.conf file is: motd file = /etc/rsync.d/rsync.motd log file = /var/log/rsyncd.log pid file = /var/run/rsyncd.pid lock file = /var/run/rsync.lock hosts allow = 10.1.2.200 10.1.2.201 hosts deny = 0.0.0.0/0.0.0.0 use chroot = yes max connections = 3 #syslog facility = [website] path = /var/www/website comment = Connex Live WWW
2003 Apr 08
2
[Patch] Require extra --stats to emit heap statistics
...tever was displayed previously. --- options.c.orig Mon Jan 27 19:11:57 2003 +++ options.c Sun Mar 30 15:11:58 2003 @@ -350,7 +350,7 @@ {"compress", 'z', POPT_ARG_NONE, &do_compression , 0, 0, 0 }, {"daemon", 0, POPT_ARG_NONE, &am_daemon , 0, 0, 0 }, {"no-detach", 0, POPT_ARG_NONE, &no_detach , 0, 0, 0 }, - {"stats", 0, POPT_ARG_NONE, &do_stats , 0, 0, 0 }, + {"stats", 0, POPT_ARG_NONE, 0, OPT_STATS, 0, 0 }, {"progress",...
2004 Jan 26
1
patch for linux capabilities
...include "rsync.h" extern int module_id; @@ -217,6 +229,10 @@ int start_glob=0; int ret; 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...
2007 Nov 10
3
Funny issue with chroot + symlink outside chroot
...virgo::test/ /tmp/rsyncdest/ 2>/dev/null [...] file has vanished: "/horsroot" (in test) -------------------------- Nothing is sent to stderr whereas error code is set: $ echo $? 24 I had a look to flist.c/sender.c, it seems this is expected behavior: (flist.c:1037) enum logcode c = am_daemon && protocol_version < 28 ? FERROR : FINFO; and indeed the message is produce by daemon, and I am using proto 29 or 30. Well, I also found the message is not the appropriate one, the file has not vanished (at least, we cannot know that, the file pointed is outside ou...
2003 Mar 11
0
PATCH: rsyncd.conf permission options
...ices(void); int lp_number(char *name); diff -ur rsync-2.5.5/rsync.c rsync-2.5.5-umask/rsync.c --- rsync-2.5.5/rsync.c Thu Dec 20 16:33:13 2001 +++ rsync-2.5.5-umask/rsync.c Sun Mar 2 22:26:40 2003 @@ -150,6 +150,8 @@ int updated = 0; STRUCT_STAT st2; int change_uid, change_gid; + extern int am_daemon; + extern int module_id; if (dry_run) return 0; @@ -203,9 +205,18 @@ #ifdef HAVE_CHMOD if (!S_ISLNK(st->st_mode)) { - if (st->st_mode != file->mode) { + mode_t mode = file->mode; /* file->mode shouldn't be modified */ + + if (am_daemon) { + if(S_ISDIR(st->st_mo...
2001 Nov 20
2
rsync server over SSH [includes code patches]
...--- 152,213 ---- uid_t uid = (uid_t)-2; gid_t gid = (gid_t)-2; char *p; ! char *addr; ! char *host; char *name = lp_name(i); int use_chroot = lp_use_chroot(i); int start_glob=0; int ret; char *request=NULL; extern int am_sender; + extern int am_server; + extern int am_daemon; extern int remote_version; extern int am_root; + if (is_a_socket(f_in)) { + addr = client_addr(f_in); + host = client_name(f_in); + } else { + char *ssh_client = getenv("SSH_CLIENT"); + addr = ssh_client ? ssh_client : "n/a"; + host = "remote shell con...
2002 Aug 02
1
[patch] --link-dest
...0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 }, /* TODO: Should this take an optional int giving the compression level? */ {"compress", 'z', POPT_ARG_NONE, &do_compression , 0, 0, 0 }, {"daemon", 0, POPT_ARG_NONE, &am_daemon , 0, 0, 0 }, @@ -591,6 +593,19 @@ /* popt stores the filename in batch_prefix for us */ read_batch = 1; break; + case OPT_LINK_DEST: +#if HAVE_LINK + compare_dest = poptGetOptArg(pc); + link_dest = 1; + break; +#else + snprintf(err_buf,sizeof(err_buf), +...