* file named AUTHORS, in the root directory of this distribution.
*/
/*
- * $Id: set_commands.c,v 1.26 2006/07/05 13:14:58 martinea Exp $
+ * $Id: set_commands.c,v 1.26.2.1 2006/12/22 15:10:27 martinea Exp $
*
* implements the "set" commands in amrecover
*/
#include "amanda.h"
+#include "util.h"
#include "amrecover.h"
#ifdef SAMBA_CLIENT
char * date)
{
char *cmd = NULL;
+ char *qdisk_path;
clear_dir_list();
is still valid at the new date, and if not set directory to
mount_point */
if (disk_path != NULL) {
- cmd = newstralloc2(cmd, "OISD ", disk_path);
+ qdisk_path = quote_string(disk_path);
+ cmd = newstralloc2(cmd, "OISD ", qdisk_path);
+ amfree(qdisk_path);
if (exchange(cmd) == -1)
exit(1);
if (server_happy())
char * mtpt)
{
char *cmd = NULL;
+ char *qdsk;
if (is_extract_list_nonempty())
{
}
clear_dir_list();
- cmd = stralloc2("DISK ", dsk);
+ qdsk = quote_string(dsk);
+ cmd = stralloc2("DISK ", qdsk);
+ amfree(qdsk);
if (converse(cmd) == -1)
exit(1);
amfree(cmd);
char * amdevice)
{
char *cmd = NULL;
+ char *qamdevice;
if(amdevice) {
- cmd = stralloc2("LISTDISK ", amdevice);
+ qamdevice = quote_string(amdevice);
+ cmd = stralloc2("LISTDISK ", qamdevice);
+ amfree(qamdevice);
if (converse(cmd) == -1)
exit(1);
amfree(cmd);
{
char *cmd = NULL;
char *new_dir = NULL;
+ char *qnew_dir;
char *dp, *de;
char *ldir = NULL;
}
}
- cmd = stralloc2("OISD ", new_dir);
+ qnew_dir = quote_string(new_dir);
+ cmd = stralloc2("OISD ", qnew_dir);
+ amfree(qnew_dir);
if (exchange(cmd) == -1) {
exit(1);
/*NOTREACHED*/