From 7a0ca7acf7376c65551e8d35965555bb072252dd Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 20 May 2003 09:08:08 +0000 Subject: [PATCH] Win32 cannot access directory fix git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@522 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 10 ++++++---- bacula/src/dird/backup.c | 2 +- bacula/src/findlib/find_one.c | 8 +++++--- bacula/src/version.h | 4 ++-- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/bacula/kernstodo b/bacula/kernstodo index 1bcaa7a3f6..dd5833720a 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -1,5 +1,5 @@ Kern's ToDo List - 19 May 2003 + 20 May 2003 Documentation to do: (any release a little bit at a time) - Document running a test version. @@ -19,10 +19,8 @@ Testing to do: (painful) - Figure out how to use ssh or stunnel to protect Bacula communications. For 1.31 release: -- Document what characters can go into Volume names. +- Finish WIN32_DATA stream code (bextract, check if can handle stream) - Default duration with no qualifier is sec should be 1 day -- Getting the following on all directories on Win32 - 19-May-2003 01:14 tibs-fd: Could not access c:/cygwin/home/kern/rxvt: ERR=Permission denied - Find a solution for the multiple FileSet problem (when it is changed). Add date? - Cancel waiting for Client connect in SD if FD goes away. @@ -871,3 +869,7 @@ Done: (see kernsdone for more) - Make sure Bacula prunes/purges canceled and failed jobs too and all jobs with zero JobFiles. - Implement Volume name checking. +- Document what characters can go into Volume names. +- Getting the following on all directories on Win32 + 19-May-2003 01:14 tibs-fd: Could not access c:/cygwin/home/kern/rxvt: ERR=Permission denied + diff --git a/bacula/src/dird/backup.c b/bacula/src/dird/backup.c index 0281e422f3..dd54012c30 100644 --- a/bacula/src/dird/backup.c +++ b/bacula/src/dird/backup.c @@ -115,7 +115,7 @@ int do_backup(JCR *jcr) /* Look up start time of last job */ jcr->jr.JobId = 0; if (!db_find_job_start_time(jcr, jcr->db, &jcr->jr, &jcr->stime)) { - Jmsg(jcr, M_INFO, 0, _("Last FULL backup time not found. Doing FULL backup.\n")); + Jmsg(jcr, M_INFO, 0, _("No prior or suitable FULL backup found. Doing FULL backup.\n")); jcr->JobLevel = jcr->jr.Level = L_FULL; } else { strcpy(since, ", since="); diff --git a/bacula/src/findlib/find_one.c b/bacula/src/findlib/find_one.c index 8d3bf5e3b4..f95c6d3ce8 100755 --- a/bacula/src/findlib/find_one.c +++ b/bacula/src/findlib/find_one.c @@ -197,6 +197,7 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt), int status; dev_t our_device = ff_pkt->statp.st_dev; +#ifndef HAVE_CYGWIN if (access(fname, R_OK) == -1 && geteuid() != 0) { /* Could not access() directory */ ff_pkt->type = FT_NOACCESS; @@ -207,6 +208,7 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt), } return rtn_stat; } +#endif /* Build a canonical directory name with a trailing slash in link var */ len = strlen(fname); @@ -241,13 +243,13 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt), * user has turned it off for this directory. */ if (ff_pkt->flags & FO_NO_RECURSION) { - free(link); /* No recursion into this directory */ ff_pkt->type = FT_NORECURSE; rtn_stat = handle_file(ff_pkt, pkt); if (ff_pkt->linked) { ff_pkt->linked->FileIndex = ff_pkt->FileIndex; } + free(link); free(dir_ff_pkt->fname); free(dir_ff_pkt->link); free(dir_ff_pkt); @@ -260,13 +262,13 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt), */ if (!top_level && !(ff_pkt->flags & FO_MULTIFS) && parent_device != ff_pkt->statp.st_dev) { - free(link); /* returning here means we do not handle this directory */ ff_pkt->type = FT_NOFSCHG; rtn_stat = handle_file(ff_pkt, pkt); if (ff_pkt->linked) { ff_pkt->linked->FileIndex = ff_pkt->FileIndex; } + free(link); free(dir_ff_pkt->fname); free(dir_ff_pkt->link); free(dir_ff_pkt); @@ -277,13 +279,13 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt), */ errno = 0; if ((directory = opendir(fname)) == NULL) { - free(link); ff_pkt->type = FT_NOOPEN; ff_pkt->ff_errno = errno; rtn_stat = handle_file(ff_pkt, pkt); if (ff_pkt->linked) { ff_pkt->linked->FileIndex = ff_pkt->FileIndex; } + free(link); free(dir_ff_pkt->fname); free(dir_ff_pkt->link); free(dir_ff_pkt); diff --git a/bacula/src/version.h b/bacula/src/version.h index 499457ade4..257a016be7 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ #define VERSION "1.31" #define VSTRING "1" -#define BDATE "19 May 2003" -#define LSMDATE "19May03" +#define BDATE "20 May 2003" +#define LSMDATE "20May03" /* Debug flags */ #define DEBUG 1 -- 2.39.5