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
Added ITEM_NO_DEST_AND_NO_UPDATE for use by the generator's
[rsync/rsync.git]
/
socket.c
diff --git
a/socket.c
b/socket.c
index
7dfb258
..
c6341ce
100644
(file)
--- a/
socket.c
+++ b/
socket.c
@@
-198,7
+198,7
@@
int open_socket_out(char *host, int port, const char *bind_address,
strlcpy(buffer, h, sizeof buffer);
/* Is the USER:PASS@ prefix present? */
strlcpy(buffer, h, sizeof buffer);
/* Is the USER:PASS@ prefix present? */
- if ((cp = strchr(buffer, '@')) != NULL) {
+ if ((cp = str
r
chr(buffer, '@')) != NULL) {
*cp++ = '\0';
/* The remainder is the HOST:PORT part. */
h = cp;
*cp++ = '\0';
/* The remainder is the HOST:PORT part. */
h = cp;
@@
-506,6
+506,9
@@
void start_accept_loop(int port, int (*fn)(int, int))
int ret;
for (i = 0; sp[i] >= 0; i++)
close(sp[i]);
int ret;
for (i = 0; sp[i] >= 0; i++)
close(sp[i]);
+ /* Re-open log file in child before possibly giving
+ * up privileges (see log_close() above). */
+ log_open();
ret = fn(fd, fd);
close_all();
_exit(ret);
ret = fn(fd, fd);
close_all();
_exit(ret);