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
load just the globals section of the config file when the daemon
[rsync/rsync.git]
/
clientserver.c
diff --git
a/clientserver.c
b/clientserver.c
index
9cac2ef
..
121252b
100644
(file)
--- a/
clientserver.c
+++ b/
clientserver.c
@@
-266,7
+266,7
@@
static int start_daemon(int fd)
extern char *config_file;
extern int remote_version;
extern char *config_file;
extern int remote_version;
- if (!lp_load(config_file)) {
+ if (!lp_load(config_file
, 0
)) {
exit_cleanup(1);
}
exit_cleanup(1);
}
@@
-327,7
+327,7
@@
static int start_daemon(int fd)
int daemon_main(void)
{
int daemon_main(void)
{
-
log_open()
;
+
extern char *config_file
;
if (is_a_socket(STDIN_FILENO)) {
/* we are running via inetd */
if (is_a_socket(STDIN_FILENO)) {
/* we are running via inetd */
@@
-336,6
+336,13
@@
int daemon_main(void)
become_daemon();
become_daemon();
+ if (!lp_load(config_file, 1)) {
+ fprintf(stderr,"failed to load config file %s\n", config_file);
+ exit_cleanup(1);
+ }
+
+ log_open();
+
rprintf(FINFO,"rsyncd version %s starting\n",VERSION);
start_accept_loop(rsync_port, start_daemon);
rprintf(FINFO,"rsyncd version %s starting\n",VERSION);
start_accept_loop(rsync_port, start_daemon);