summaryrefslogtreecommitdiff
path: root/source3/utils/testparm.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/testparm.c')
-rw-r--r--source3/utils/testparm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index cc35d2d530..a35a3fd71e 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -38,6 +38,7 @@
/* these live in util.c */
extern FILE *dbf;
extern int DEBUGLEVEL;
+extern pstring myhostname;
int main(int argc, char *argv[])
{
@@ -60,6 +61,12 @@ extern int DEBUGLEVEL;
printf("Load smb config files from %s\n",configfile);
+ if(!get_myname(myhostname,NULL))
+ {
+ printf("Failed to get my hostname.\n");
+ return(1);
+ }
+
if (!lp_load(configfile,False))
{
printf("Error loading services.\n");