diff options
| author | David Dykstra <dwd@samba.org> | 2003-01-26 03:46:54 +0000 |
|---|---|---|
| committer | David Dykstra <dwd@samba.org> | 2003-01-26 03:46:54 +0000 |
| commit | 536b84680b4ab1f29fa456b4fa7b5b16eff4af8f (patch) | |
| tree | 1036c57d6c38d596ccb9b6c842797c3d4fed3bd5 /authenticate.c | |
| parent | 7508b795bf32de44aa550500d56b3935df5c33a7 (diff) | |
| download | android_external_rsync-536b84680b4ab1f29fa456b4fa7b5b16eff4af8f.tar.gz android_external_rsync-536b84680b4ab1f29fa456b4fa7b5b16eff4af8f.tar.bz2 android_external_rsync-536b84680b4ab1f29fa456b4fa7b5b16eff4af8f.zip | |
Open config files in text mode when O_TEXT is defined. This helps on
Cygwin when the config files are on a filesystem that is mounted in
binary mode. Patch from Ville Herva.
Diffstat (limited to 'authenticate.c')
| -rw-r--r-- | authenticate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/authenticate.c b/authenticate.c index 7d44da6e..a1c35755 100644 --- a/authenticate.c +++ b/authenticate.c @@ -82,7 +82,7 @@ static int get_secret(int module, char *user, char *secret, int len) if (!fname || !*fname) return 0; - fd = open(fname,O_RDONLY); + fd = open(fname,O_RDONLY | O_TEXT); if (fd == -1) return 0; if (do_stat(fname, &st) == -1) { @@ -144,7 +144,7 @@ static char *getpassf(char *filename) if (!filename) return NULL; - if ( (fd=open(filename,O_RDONLY)) == -1) { + if ( (fd=open(filename,O_RDONLY | O_TEXT)) == -1) { rsyserr(FERROR, errno, "could not open password file \"%s\"",filename); if (envpw) rprintf(FERROR,"falling back to RSYNC_PASSWORD environment variable.\n"); return NULL; |
