search for: io_printf

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

2001 Nov 20
2
rsync server over SSH [includes code patches]
...e[16]; --- 202,208 ---- otherwise return username */ ! char *auth_server(int f_in, int f_out, int module, char *addr, char *leader) { char *users = lp_auth_users(module); char challenge[16]; *************** *** 221,229 **** base64_encode(challenge, 16, b64_challenge); ! io_printf(fd,"%s%s\n", leader, b64_challenge); ! if (!read_line(fd, line, sizeof(line)-1)) { return NULL; } --- 221,229 ---- base64_encode(challenge, 16, b64_challenge); ! io_printf(f_out,"%s%s\n", leader, b64_challenge); ! if (!read_line(f_in, line, sizeof(li...
2004 Jan 26
1
patch for linux capabilities
...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"); + return -1; + } + if( (cp = cap_init()) == NULL ) { + rsyserr(FERROR,...
2002 Apr 03
4
Patch to avoid 'Connection reset by peer' error for rsync on cygwin
....5/clientserver.c Wed Mar 27 01:03:13 2002 +++ rsync-2.5.5-tweaked/clientserver.c Wed Apr 3 11:01:57 2002 @@ -486,39 +486,44 @@ } if (!read_line(fd, line, sizeof(line)-1)) { - return -1; + goto exitwithnomodule; } if (sscanf(line,"@RSYNCD: %d", &remote_version) != 1) { io_printf(fd,"@ERROR: protocol startup error\n"); - return -1; + goto exitwithnomodule; } while (i == -1) { line[0] = 0; if (!read_line(fd, line, sizeof(line)-1)) { - return -1; + goto exitwithnomodule; } if (!*line || strcmp(line,"#list")==0) { send_listing(fd...
2002 May 09
0
[PATCH] (Resubmission) 'Connection reset by peer' with rsync server on cygwin
....5/clientserver.c Wed Mar 27 01:03:13 2002 +++ rsync-2.5.5-tweaked/clientserver.c Wed Apr 3 11:01:57 2002 @@ -486,39 +486,44 @@ } if (!read_line(fd, line, sizeof(line)-1)) { - return -1; + goto exitwithnomodule; } if (sscanf(line,"@RSYNCD: %d", &remote_version) != 1) { io_printf(fd,"@ERROR: protocol startup error\n"); - return -1; + goto exitwithnomodule; } while (i == -1) { line[0] = 0; if (!read_line(fd, line, sizeof(line)-1)) { - return -1; + goto exitwithnomodule; } if (!*line || strcmp(line,"#list")==0) { send_listing(fd...
2015 Apr 21
1
[Bug 11229] New: off-by-one in snprintf() check
...c: fix of-by-one in check of snprintf() result Signed-off-by: Stefan Behrens <sbehrens at giantdisaster.de> --- io.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/io.c b/io.c index b9a9bd082737..03e13d846fa0 100644 --- a/io.c +++ b/io.c @@ -2283,7 +2283,7 @@ void io_printf(int fd, const char *format, ...) if (len < 0) exit_cleanup(RERR_PROTOCOL); - if (len > (int)sizeof buf) { + if (len >= (int)sizeof buf) { rprintf(FERROR, "io_printf() was too long for the buffer.\n"); exit_clean...
2002 Jun 18
2
rsyncd + scripting
Hey all, Like a lot of folks, I use rsync to pull content out to production web servers. Tastes great, less filling. Here's what I'd like to be able to do: Sometimes a web tree is not ready to sync, for whatever reason. I have many modules available, so stopping ryncd is not an option. I'd like to be able to tell rsync in daemon mode "this particular module is not available at
2003 Feb 22
1
rsync ported to BeOS-bone
...server.c rsync-2.5.6/clientserver.c --- rsync-2.5.6.org/clientserver.c Sun Jan 26 21:08:14 2003 +++ rsync-2.5.6/clientserver.c Thu Feb 20 21:06:41 2003 @@ -314,11 +314,16 @@ * a warning, unless a "require chroot" flag is set, * in which case we fail. */ +#ifndef HAVE_CHROOT + io_printf(f_out, "@ERROR: asked to chroot but not possible on host OS\n"); + return -1; +#else if (chroot(lp_path(i))) { rsyserr(FERROR, errno, "chroot %s failed", lp_path(i)); io_printf(f_out, "@ERROR: chroot failed\n"); return -1; } +#endif if (!push_di...
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
2001 Aug 22
1
@RSYNC EXIT / @RSYNC EOF
...proper EXIT command. Yuck. */ + kludge_around_eof= True; + if (!read_line(fd, line, sizeof(line)-1)) { return -1; } @@ -122,6 +127,7 @@ int start_socket_client(char *host, char rprintf(FINFO,"%s\n", line); } + kludge_around_eof = False; for (i=0;i<sargc;i++) { io_printf(fd,"%s\n", sargs[i]); Index: io.c =================================================================== RCS file: /data/cvs/rsync/io.c,v retrieving revision 1.85 diff -u -p -r1.85 io.c --- io.c 7 May 2001 06:59:37 -0000 1.85 +++ io.c 22 Aug 2001 04:15:12 -0000 @@ -2,6 +2,7 @@ Copyr...
2007 Sep 22
0
rsync build on IA64 using icc
...ated in unspecified order rsyserr(FLOG, errno, "chdir %s failed\n", ^ clientserver.c(665): remark #1599: declaration hides parameter "i" (declared at line 271) int i; ^ clientserver.c(718): remark #981: operands are evaluated in unspecified order io_printf(fd, "%-15s\t%s\n", lp_name(i), lp_comment(i)); ^ clientserver.c(718): remark #981: operands are evaluated in unspecified order io_printf(fd, "%-15s\t%s\n", lp_name(i), lp_comment(i)); ^ /opt/intel/compilo_9/l_cc_c_9.1.042...