X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/d02363609a73a62a2c5cfd06f02a7e8babe1bc75..565a340b0a275faeff7b434ccf8bab98ff0d073d:/clientserver.c diff --git a/clientserver.c b/clientserver.c index b7771251..e557309d 100644 --- a/clientserver.c +++ b/clientserver.c @@ -3,12 +3,11 @@ * * Copyright (C) 1998-2001 Andrew Tridgell * Copyright (C) 2001-2002 Martin Pool - * Copyright (C) 2002, 2003, 2004, 2005, 2006 Wayne Davison + * Copyright (C) 2002-2007 Wayne Davison * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -31,6 +30,7 @@ extern int am_server; extern int am_daemon; extern int am_root; extern int rsync_port; +extern int ignore_errors; extern int kluge_around_eof; extern int daemon_over_rsh; extern int sanitize_paths; @@ -625,7 +625,14 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host) verbose = 0; /* future verbosity is controlled by client options */ ret = parse_arguments(&argc, (const char ***) &argv, 0); - quiet = 0; /* Don't let someone try to be tricky. */ + am_server = 1; /* Don't let someone try to be tricky. */ + if (lp_ignore_errors(module_id)) + ignore_errors = 1; + + if (lp_fake_super(i)) + am_root = -1; + else if (am_root < 0) /* Treat --fake-super from client as --super. */ + am_root = 2; if (filesfrom_fd == 0) filesfrom_fd = f_in; @@ -680,7 +687,7 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host) if (!ret || err_msg) { if (err_msg) - rwrite(FERROR, err_msg, strlen(err_msg)); + rwrite(FERROR, err_msg, strlen(err_msg), 0); else option_error(); msleep(400);