Fix SQLite3 build error.
Don't enable unnecessary privileges, its a security problem.
Fix bextract and bscan on Windows.
Fix comment typos.
Fix copyright changes in the tray-monitor so it builds.
Add SQLite3 support to the Windows build.
Remove bdb support from Windows version.
Reworked the installer to facilitate the regression tests.
Improved the database support in the installer.
Automatically detect installed database and program paths.
Start external programs minimized so they don't bother the user.
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3718
91ce42f0-d328-0410-95d8-
f526ca767f89
#define DEFAULT_CONFIGDIR "C:\\Documents and Settings\\All Users\\Application Data\\Bacula"
inline bool IsPathSeparator(int ch) { return ch == '/' || ch == '\\'; }
-inline char *first_path_separator(char *path) { return strpbrk(path, ":/\\"); }
-inline const char *first_path_separator(const char *path) { return strpbrk(path, ":/\\"); }
+inline char *first_path_separator(char *path) { return strpbrk(path, "/\\"); }
+inline const char *first_path_separator(const char *path) { return strpbrk(path, "/\\"); }
#else
/* Define Winsock functions if we aren't on Windows */
int stat;
if (mdb->sqlite_errmsg) {
+#ifdef HAVE_SQLITE3
+ sqlite3_free(mdb->sqlite_errmsg);
+#else
actuallyfree(mdb->sqlite_errmsg);
+#endif
mdb->sqlite_errmsg = NULL;
}
stat = sqlite_get_table(mdb->db, (char *)cmd, &mdb->result, &mdb->nrow, &mdb->ncolumn,
}
/* Return a bit map of permissions set. */
- if (enable_priv(jcr, hToken, SE_SECURITY_NAME, ignore_errors)) {
- stat |= 1<<0;
- }
if (enable_priv(jcr, hToken, SE_BACKUP_NAME, ignore_errors)) {
stat |= 1<<1;
}
if (enable_priv(jcr, hToken, SE_RESTORE_NAME, ignore_errors)) {
stat |= 1<<2;
}
+#if 0
+ if (enable_priv(jcr, hToken, SE_SECURITY_NAME, ignore_errors)) {
+ stat |= 1<<0;
+ }
if (enable_priv(jcr, hToken, SE_TAKE_OWNERSHIP_NAME, ignore_errors)) {
stat |= 1<<3;
}
if (enable_priv(jcr, hToken, SE_CREATE_PERMANENT_NAME, ignore_errors)) {
stat |= 1<<10;
}
+#endif
if (stat) {
stat |= 1<<9;
}
*/
TREE_NODE *tree_cwd(char *path, TREE_ROOT *root, TREE_NODE *node)
{
- if (strcmp(path, ".") == 0) {
+ if (path[0] == '.' && path[1] == '\0') {
return node;
}
/* Handle relative path */
- if (strncmp(path, "..", 2) == 0 && (path[2] == '/' || path[2] == 0)) {
+ if (path[0] == '.' && path[1] == '.' && (IsPathSeparator(path[2]) || path[2] == '\0')) {
TREE_NODE *parent = node->parent ? node->parent : node;
if (path[2] == 0) {
return parent;
static void do_extract(char *devname)
{
struct stat statp;
+
+ enable_backup_privileges(NULL, 1);
+
jcr = setup_jcr("bextract", devname, bsr, VolumeName, 1); /* acquire for read */
if (!jcr) {
exit(1);
my_name_is(argc, argv, "bscan");
init_msg(NULL, NULL);
+ OSDependentInit();
while ((ch = getopt(argc, argv, "b:c:d:h:mn:pP:rsSu:vV:w:?")) != -1) {
switch (ch) {
/*
* If we have a digest stream, we check to see if we have
* finished the current bsr, and if so, repositioning will
- * be truned on.
+ * be turned on.
*/
if (crypto_digest_stream_type(rec->Stream) != CRYPTO_DIGEST_NONE) {
Dmsg3(dbglvl, "Have digest FI=%u before bsr check pos %u:%u\n", rec->FileIndex,