Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Include a test for a working getopt_long because the one on some versions
[rsync/rsync.git]
/
clientserver.c
diff --git
a/clientserver.c
b/clientserver.c
index
557eb5f
..
9e79538
100644
(file)
--- a/
clientserver.c
+++ b/
clientserver.c
@@
-34,7
+34,6
@@
int start_socket_client(char *host, char *path, int argc, char *argv[])
char line[MAXPATHLEN];
char *p, *user=NULL;
extern int remote_version;
char line[MAXPATHLEN];
char *p, *user=NULL;
extern int remote_version;
- extern int am_client;
extern int am_sender;
if (*path == '/') {
extern int am_sender;
if (*path == '/') {
@@
-52,8
+51,6
@@
int start_socket_client(char *host, char *path, int argc, char *argv[])
if (!user) user = getenv("USER");
if (!user) user = getenv("LOGNAME");
if (!user) user = getenv("USER");
if (!user) user = getenv("LOGNAME");
- am_client = 1;
-
fd = open_socket_out(host, rsync_port);
if (fd == -1) {
exit_cleanup(RERR_SOCKETIO);
fd = open_socket_out(host, rsync_port);
if (fd == -1) {
exit_cleanup(RERR_SOCKETIO);
@@
-212,7
+209,7
@@
static int rsync_module(int fd, int i)
return -1;
}
return -1;
}
- if (
chdir("/"
)) {
+ if (
!push_dir("/", 0
)) {
rprintf(FERROR,"chdir %s failed\n", lp_path(i));
io_printf(fd,"@ERROR: chdir failed\n");
return -1;
rprintf(FERROR,"chdir %s failed\n", lp_path(i));
io_printf(fd,"@ERROR: chdir failed\n");
return -1;
@@
-292,7
+289,7
@@
static int rsync_module(int fd, int i)
}
}
}
}
- ret = parse_arguments(argc, argv);
+ ret = parse_arguments(argc, argv
, 0
);
if (request) {
if (*auth_user) {
if (request) {
if (*auth_user) {
@@
-422,11
+419,6
@@
int daemon_main(void)
extern char *config_file;
char *pid_file;
extern char *config_file;
char *pid_file;
- /* this ensures that we don't call getcwd after the chroot,
- which doesn't work on platforms that use popen("pwd","r")
- for getcwd */
- push_dir("/", 0);
-
if (is_a_socket(STDIN_FILENO)) {
int i;
if (is_a_socket(STDIN_FILENO)) {
int i;