summaryrefslogtreecommitdiffstats
path: root/source/torture
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-08 18:50:07 -0800
committerJeremy Allison <jra@samba.org>2007-11-08 18:50:07 -0800
commit7a1de5b44e84a7474e78518c6ba33b3fedc42b5f (patch)
treeb27891de35d06dc48adaa7d353ab3defe385a081 /source/torture
parentc21bc756e36581d3adc770bc2b773b5cf9bf11d0 (diff)
downloadsamba-7a1de5b44e84a7474e78518c6ba33b3fedc42b5f.tar.gz
samba-7a1de5b44e84a7474e78518c6ba33b3fedc42b5f.tar.xz
samba-7a1de5b44e84a7474e78518c6ba33b3fedc42b5f.zip
Remove more pstring/fstrings.
Jeremy.
Diffstat (limited to 'source/torture')
-rw-r--r--source/torture/rpctorture.c5
-rw-r--r--source/torture/torture.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/source/torture/rpctorture.c b/source/torture/rpctorture.c
index d8fcedd8de6..64e7b580f3c 100644
--- a/source/torture/rpctorture.c
+++ b/source/torture/rpctorture.c
@@ -228,6 +228,7 @@ enum client_action
int nprocs = 1;
int numops = 100;
pstring logfile;
+ TALLOC_CTX *frame = talloc_stackframe();
struct client_info cli_info;
@@ -292,8 +293,8 @@ enum client_action
setup_logging(pname, True);
- if (!get_myname(global_myname))
- {
+ global_myname = get_myname(global_myname);
+ if (!global_myname) {
fprintf(stderr, "Failed to get my hostname.\n");
}
diff --git a/source/torture/torture.c b/source/torture/torture.c
index 697d87adc7b..88711ef6776 100644
--- a/source/torture/torture.c
+++ b/source/torture/torture.c
@@ -5175,6 +5175,7 @@ static void usage(void)
int gotuser = 0;
int gotpass = 0;
bool correct = True;
+ TALLOC_CTX *frame = talloc_stackframe();
dbf = x_stdout;
@@ -5207,7 +5208,11 @@ static void usage(void)
*p = 0;
fstrcpy(share, p+1);
- get_myname(myname);
+ fstrcpy(myname, get_myname(talloc_tos()));
+ if (!*myname) {
+ fprintf(stderr, "Failed to get my hostname.\n");
+ return 1;
+ }
if (*username == 0 && getenv("LOGNAME")) {
fstrcpy(username,getenv("LOGNAME"));
@@ -5309,6 +5314,8 @@ static void usage(void)
}
}
+ TALLOC_FREE(frame);
+
if (correct) {
return(0);
} else {