diff options
author | Wayne Davison <wayned@samba.org> | 2010-10-12 08:05:43 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2010-10-12 10:34:38 -0700 |
commit | 5ebe9a46d7f3c846a6d665cb8c6ab8b79508a6df (patch) | |
tree | 3465ebb93bce22b899e0add70865506718724a9b /io.c | |
parent | d64bda1c1e79dc385f194d74f7957ce7cd118654 (diff) | |
download | android_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.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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') |