version 1.31, 2014/07/12 03:48:04 |
version 1.32, 2015/01/20 09:00:16 |
|
|
* SUCH DAMAGE. |
* SUCH DAMAGE. |
*/ |
*/ |
|
|
#include <sys/socket.h> |
#include <ctype.h> |
#include <dirent.h> |
#include <dirent.h> |
#include <netdb.h> |
#include <errno.h> |
|
#include <fcntl.h> |
|
#include <paths.h> |
|
#include <stdlib.h> |
|
#include <string.h> |
|
#include <unistd.h> |
|
|
#include "defs.h" |
#include "client.h" |
#include "y.tab.h" |
#include "y.tab.h" |
|
|
/* |
/* |
|
|
struct subcmd *subcmds; /* list of sub-commands for |
struct subcmd *subcmds; /* list of sub-commands for |
current cmd */ |
current cmd */ |
struct namelist *filelist; /* list of source files */ |
struct namelist *filelist; /* list of source files */ |
extern struct cmd *cmds; /* Initialized by yyparse() */ |
|
time_t lastmod; /* Last modify time */ |
time_t lastmod; /* Last modify time */ |
|
|
extern char target[BUFSIZ]; |
|
extern char *ptarget; |
|
extern int activechildren; |
|
extern int maxchildren; |
|
extern int amchild; |
|
extern char *path_rdistd; |
|
|
|
static void closeconn(void); |
static void closeconn(void); |
static void notify(char *, struct namelist *, time_t); |
static void notify(char *, struct namelist *, time_t); |
static void checkcmd(struct cmd *); |
static void checkcmd(struct cmd *); |
|
|
FILE *pf; |
FILE *pf; |
struct stat stb; |
struct stat stb; |
static char buf[BUFSIZ]; |
static char buf[BUFSIZ]; |
extern char *locuser; |
|
char *file, *user; |
char *file, *user; |
|
|
if (IS_ON(options, DO_VERIFY) || to == NULL) |
if (IS_ON(options, DO_VERIFY) || to == NULL) |
|
|
{ |
{ |
char *ruser, *cp; |
char *ruser, *cp; |
static char *cur_host = NULL; |
static char *cur_host = NULL; |
extern char *locuser; |
|
extern int64_t min_freefiles, min_freespace; |
|
extern char *remotemsglist; |
|
char tuser[BUFSIZ], buf[BUFSIZ]; |
char tuser[BUFSIZ], buf[BUFSIZ]; |
u_char respbuff[BUFSIZ]; |
u_char respbuff[BUFSIZ]; |
int n; |
int n; |
|
|
/* |
/* |
* The server sent it's version number to us |
* The server sent it's version number to us |
*/ |
*/ |
proto_version = atoi(&respbuff[1]); |
int proto_version = atoi(&respbuff[1]); |
if (proto_version != VERSION) { |
if (proto_version != VERSION) { |
fatalerr( |
fatalerr( |
"Server version (%d) is not the same as local version (%d).", |
"Server version (%d) is not the same as local version (%d).", |