aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2010-10-12 08:05:43 -0700
committerWayne Davison <wayned@samba.org>2010-10-12 10:34:38 -0700
commit5ebe9a46d7f3c846a6d665cb8c6ab8b79508a6df (patch)
tree3465ebb93bce22b899e0add70865506718724a9b /io.c
parentd64bda1c1e79dc385f194d74f7957ce7cd118654 (diff)
downloadandroid_external_rsync-5ebe9a46d7f3c846a6d665cb8c6ab8b79508a6df.tar.gz
android_external_rsync-5ebe9a46d7f3c846a6d665cb8c6ab8b79508a6df.tar.bz2
android_external_rsync-5ebe9a46d7f3c846a6d665cb8c6ab8b79508a6df.zip
Add @group auth and overrides to "auth user" daemon config.
Diffstat (limited to 'io.c')
-rw-r--r--io.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/io.c b/io.c
index bf39ff91..63dff838 100644
--- a/io.c
+++ b/io.c
@@ -2205,13 +2205,16 @@ int32 read_ndx(int f)
/* Read a line of up to bufsiz-1 characters into buf. Strips
* the (required) trailing newline and all carriage returns.
* Returns 1 for success; 0 for I/O error or truncation. */
-int read_line_old(int fd, char *buf, size_t bufsiz)
+int read_line_old(int fd, char *buf, size_t bufsiz, int eof_ok)
{
+ assert(fd != iobuf.in_fd);
bufsiz--; /* leave room for the null */
while (bufsiz > 0) {
- assert(fd != iobuf.in_fd);
- if (safe_read(fd, buf, 1) == 0)
+ if (safe_read(fd, buf, 1) == 0) {
+ if (eof_ok)
+ break;
return 0;
+ }
if (*buf == '\0')
return 0;
if (*buf == '\n')