diff options
| author | Wayne Davison <wayned@samba.org> | 2005-02-07 20:36:43 +0000 |
|---|---|---|
| committer | Wayne Davison <wayned@samba.org> | 2005-02-07 20:36:43 +0000 |
| commit | 4875d6b64dd0ed8d451746cc0cc609cff36192bd (patch) | |
| tree | a67e793c04e5628b8bfbad50864d9b62aab936d8 /authenticate.c | |
| parent | 54b405985632b71444f215bb547a2b6a7f0f3637 (diff) | |
| download | android_external_rsync-4875d6b64dd0ed8d451746cc0cc609cff36192bd.tar.gz android_external_rsync-4875d6b64dd0ed8d451746cc0cc609cff36192bd.tar.bz2 android_external_rsync-4875d6b64dd0ed8d451746cc0cc609cff36192bd.zip | |
Adding more calls to safe_fname().
Diffstat (limited to 'authenticate.c')
| -rw-r--r-- | authenticate.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/authenticate.c b/authenticate.c index 542f4403..ff240288 100644 --- a/authenticate.c +++ b/authenticate.c @@ -87,7 +87,7 @@ static int get_secret(int module, char *user, char *secret, int len) return 0; if (do_stat(fname, &st) == -1) { - rsyserr(FLOG, errno, "stat(%s)", fname); + rsyserr(FLOG, errno, "stat(%s)", safe_fname(fname)); ok = 0; } else if (lp_strict_modes(module)) { if ((st.st_mode & 06) != 0) { @@ -156,14 +156,15 @@ static char *getpassf(char *filename) return NULL; if ((fd = open(filename,O_RDONLY)) < 0) { - rsyserr(FERROR, errno, "could not open password file \"%s\"",filename); + rsyserr(FERROR, errno, "could not open password file \"%s\"", + safe_fname(filename)); if (envpw) rprintf(FERROR, "falling back to RSYNC_PASSWORD environment variable.\n"); return NULL; } if (do_stat(filename, &st) == -1) { - rsyserr(FERROR, errno, "stat(%s)", filename); + rsyserr(FERROR, errno, "stat(%s)", safe_fname(filename)); ok = 0; } else if ((st.st_mode & 06) != 0) { rprintf(FERROR,"password file must not be other-accessible\n"); |
