aboutsummaryrefslogtreecommitdiffstats
path: root/authenticate.c
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2000-10-26 07:31:29 +0000
committerMartin Pool <mbp@samba.org>2000-10-26 07:31:29 +0000
commit4a13b9d57ac9cd848d7644886e12fd3aae3f70c4 (patch)
tree7e8be8546b4a45bf6111297a2e4e8e0502ea1fe1 /authenticate.c
parenta039749b4c21e3439dc06fcdd5355828f1f95463 (diff)
downloadandroid_external_rsync-4a13b9d57ac9cd848d7644886e12fd3aae3f70c4.tar.gz
android_external_rsync-4a13b9d57ac9cd848d7644886e12fd3aae3f70c4.tar.bz2
android_external_rsync-4a13b9d57ac9cd848d7644886e12fd3aae3f70c4.zip
Print strerror when a system error occurs; add a new function rsyserr
to do this. This is not used in every case yet -- I've just changed a few cases that were causing trouble. Please convert others as you see them.
Diffstat (limited to 'authenticate.c')
-rw-r--r--authenticate.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/authenticate.c b/authenticate.c
index 842a59ee..9aae72d3 100644
--- a/authenticate.c
+++ b/authenticate.c
@@ -1,5 +1,6 @@
-/*
- Copyright (C) Andrew Tridgell 1998
+/* -*- c-file-style: "linux"; -*-
+
+ Copyright (C) 1998-2000 by Andrew Tridgell
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -144,7 +145,7 @@ static char *getpassf(char *filename)
if (!filename) return NULL;
if ( (fd=open(filename,O_RDONLY)) == -1) {
- rprintf(FERROR,"could not open password file \"%s\"\n",filename);
+ rsyserr(FERROR, errno, "could not open password file \"%s\"",filename);
if (envpw) rprintf(FERROR,"falling back to RSYNC_PASSWORD environment variable.\n");
return NULL;
}