From b5d94fd3c2193ab19ec3863b9dab166b76a79bf4 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 25 Sep 2006 21:42:21 +0000 Subject: [PATCH] kes Update src/win32/dll/bacula.def for change in BPIPE definition for Win32 build. kes Fix a compiler warning in compat.cpp kes Change strcpy to bstrncpy in compat.cpp kes Remove some broken code in bdb_list.c kes Fix, hopefully the last, ACL problem in the restore command. kes Update the README.mingw32 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3504 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 14 ++++++-------- bacula/src/cats/bdb_list.c | 2 ++ bacula/src/dird/ua_query.c | 2 +- bacula/src/dird/ua_restore.c | 6 +++++- bacula/src/win32/README.mingw32 | 10 +++++++++- bacula/src/win32/compat/compat.cpp | 5 ++--- bacula/src/win32/dll/bacula.def | 2 +- bacula/technotes-1.39 | 7 +++++++ 8 files changed, 33 insertions(+), 15 deletions(-) diff --git a/bacula/kernstodo b/bacula/kernstodo index 5e37d3c365..3ffb0aed3d 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -21,14 +21,12 @@ Document: \bacula\working). - Document techniques for restoring large numbers of files. - Document setting my.cnf to big file usage. -- Add example of proper index output to doc. - show index from File; +- Add example of proper index output to doc. show index from File; - Correct the Include syntax in the m4.xxx files in examples/conf - Document JobStatus and Termination codes. - Fix the error with the "DVI file can't be opened" while building the French PDF. -- Document more DVD stuff -- particularly that recycling doesn't work, - and all the other things too. +- Document more DVD stuff - Doc { "JobErrors", "i"}, { "JobFiles", "i"}, @@ -41,8 +39,6 @@ Document: Priority: For 1.39: -- When reading through parts on the DVD, the DVD is mounted and - unmounted for each part. - Make sure that the restore options don't permit "seeing" other Client's job data. -- mostly fixed. - Implement Python event for backing up/restoring a file. @@ -56,8 +52,7 @@ For 1.39: - Look at zlib 32 => 64 problems. - Try turning on disk seek code. - Possibly turn on St. Bernard code. -- Fix bextract to restore ACLs, or better yet, use common - routines. +- Fix bextract to restore ACLs, or better yet, use common routines. - Do we migrate appendable Volumes? - Remove queue.c code. - Some users claim that they must do two prune commands to get a @@ -1694,3 +1689,6 @@ Block Position: 0 > to the slots keyword, you can apply the enable/disable to any or all volumes. - Restricted consoles start in the Default catalog even if it is not permitted. +- When reading through parts on the DVD, the DVD is mounted and + unmounted for each part. + diff --git a/bacula/src/cats/bdb_list.c b/bacula/src/cats/bdb_list.c index fbadb34ddc..503a076e02 100644 --- a/bacula/src/cats/bdb_list.c +++ b/bacula/src/cats/bdb_list.c @@ -182,6 +182,7 @@ void db_list_jobmedia_records(JCR *jcr, B_DB *mdb, uint32_t JobId, void db_list_job_records(JCR *jcr, B_DB *mdb, JOB_DBR *jr, DB_LIST_HANDLER *sendit, void *ctx) { +#ifdef xxx int jrlen; JOB_DBR ojr; int done = 0; @@ -220,6 +221,7 @@ void db_list_job_records(JCR *jcr, B_DB *mdb, JOB_DBR *jr, } sendit(ctx, "============================================================================\n"); db_unlock(mdb); +#endif return; } diff --git a/bacula/src/dird/ua_query.c b/bacula/src/dird/ua_query.c index 6e1a3c2b84..76ab8c038d 100644 --- a/bacula/src/dird/ua_query.c +++ b/bacula/src/dird/ua_query.c @@ -7,7 +7,7 @@ * Version $Id$ */ /* - Copyright (C) 2001-2005 Kern Sibbald + Copyright (C) 2001-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/bacula/src/dird/ua_restore.c b/bacula/src/dird/ua_restore.c index c8765f5117..50e1e46fdb 100644 --- a/bacula/src/dird/ua_restore.c +++ b/bacula/src/dird/ua_restore.c @@ -422,7 +422,10 @@ static int user_select_jobids_or_files(UAContext *ua, RESTORE_CTX *rx) case -1: /* error or cancel */ return 0; case 0: /* list last 20 Jobs run */ - /* ***FIXME*** restrict clients on restricted console */ + if (!acl_access_ok(ua, Command_ACL, NT_("sqlquery"), 8)) { + bsendmsg(ua, _("SQL query not authorized.\n")); + return 0; + } gui_save = ua->jcr->gui; ua->jcr->gui = true; db_list_sql_query(ua->jcr, ua->db, uar_list_jobs, prtit, ua, 1, HORZ_LIST); @@ -455,6 +458,7 @@ static int user_select_jobids_or_files(UAContext *ua, RESTORE_CTX *rx) break; case 3: /* Enter an SQL list command */ if (!acl_access_ok(ua, Command_ACL, NT_("sqlquery"), 8)) { + bsendmsg(ua, _("SQL query not authorized.\n")); return 0; } if (!get_cmd(ua, _("Enter SQL list command: "))) { diff --git a/bacula/src/win32/README.mingw32 b/bacula/src/win32/README.mingw32 index e14f53f3ad..f331765b9f 100644 --- a/bacula/src/win32/README.mingw32 +++ b/bacula/src/win32/README.mingw32 @@ -127,11 +127,18 @@ NOTE: The -C means clobber. Any local changes to the source code in the depkgs-mingw32/src directory will be lost. The source will be reextracted from the archive and the current patches will be applied. -If you add a new subroutine or global symbol in the CATS library +If you add a new subroutine, external or global symbol in the CATS library ================================================================= Edit src/win32/cats/bacula_cats.def and update it appropriately. The output of a link will tell you the C++ mangled subroutine name to add, and for global symbols, it is rather easy. See the file. + +There are also dlls for other libraires: src/win32/dll/bacula.def +For this file, if you have an undefined symbol, do: + + strings src/lib/libbac.a | grep + +then enter it in the appropriate place. @@ -154,3 +161,4 @@ executables, etc. Makefile.template is a template for creating new Makefiles, if you are creating a new directory, copy Makefile.template to Makefile in that directory and edit to suit. + diff --git a/bacula/src/win32/compat/compat.cpp b/bacula/src/win32/compat/compat.cpp index 7ab8a014dd..e252307a1c 100644 --- a/bacula/src/win32/compat/compat.cpp +++ b/bacula/src/win32/compat/compat.cpp @@ -1657,7 +1657,7 @@ GetApplicationName(const char *cmdline, char **pexe, const char **pargs) if (pExtension == NULL) { /* Try appending extensions */ - for (int index = 0; index < sizeof(ExtensionList) / sizeof(ExtensionList[0]); index++) { + for (int index = 0; index < (int)(sizeof(ExtensionList) / sizeof(ExtensionList[0])); index++) { if (!bHasPathSeparators) { /* There are no path separators, search in the standard locations */ @@ -1668,8 +1668,7 @@ GetApplicationName(const char *cmdline, char **pexe, const char **pargs) break; } } else { - strcpy(&pPathname[dwBasePathLength], ExtensionList[index]); - + bstrncpy(&pPathname[dwBasePathLength], ExtensionList[index], MAX_PATHLENGTH); if (GetFileAttributes(pPathname) != INVALID_FILE_ATTRIBUTES) { break; } diff --git a/bacula/src/win32/dll/bacula.def b/bacula/src/win32/dll/bacula.def index 40e60523a0..48c9059cef 100644 --- a/bacula/src/win32/dll/bacula.def +++ b/bacula/src/win32/dll/bacula.def @@ -9,7 +9,7 @@ EXPORTS ;umask ;utime _Z10open_bpipePciPKc -_Z11close_bpipeP7s_bpipe +_Z11close_bpipeP5BPIPE ;_Z11close_wpipeP7s_bpipe ;_Z11strncasecmpPKcS0_i _Z11win32_cgetsPci diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index 78e5f288a5..39099acc75 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -2,6 +2,13 @@ General: 25Sep06 +kes Update src/win32/dll/bacula.def for change in BPIPE definition for + Win32 build. +kes Fix a compiler warning in compat.cpp +kes Change strcpy to bstrncpy in compat.cpp +kes Remove some broken code in bdb_list.c +kes Fix, hopefully the last, ACL problem in the restore command. +kes Update the README.mingw32 kes Add new version of upgrade-win32-client.txt to examples directory. Submitted by Michel Meyers. kes Print an INFO message in the job report when a Volume is marked Purged. -- 2.39.5