summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/mangle_test.c3
-rw-r--r--source4/torture/masktest.c15
2 files changed, 10 insertions, 8 deletions
diff --git a/source4/torture/basic/mangle_test.c b/source4/torture/basic/mangle_test.c
index 5eb00c076f..5f2a07e02f 100644
--- a/source4/torture/basic/mangle_test.c
+++ b/source4/torture/basic/mangle_test.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "torture/torture.h"
#include "system/filesys.h"
+#include "system/dir.h"
#include "lib/tdb/include/tdbutil.h"
#include "libcli/libcli.h"
#include "torture/util.h"
@@ -130,7 +131,7 @@ static void gen_name(char *name)
p[i] = 0;
- if (strcmp(p, ".") == 0 || strcmp(p, "..") == 0) {
+ if (ISDOT(p) || ISDOTDOT(p)) {
p[0] = '_';
}
diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c
index c37efc0472..6e2678ed80 100644
--- a/source4/torture/masktest.c
+++ b/source4/torture/masktest.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "system/filesys.h"
+#include "system/dir.h"
#include "libcli/libcli.h"
#include "libcli/raw/libcliraw.h"
#include "system/time.h"
@@ -41,9 +42,9 @@ static BOOL reg_match_one(struct smbcli_state *cli, const char *pattern, const c
/* oh what a weird world this is */
if (old_list && strcmp(pattern, "*.*") == 0) return True;
- if (strcmp(pattern,".") == 0) return False;
+ if (ISDOT(pattern)) return False;
- if (strcmp(file,"..") == 0) file = ".";
+ if (ISDOTDOT(file)) file = ".";
return ms_fnmatch(pattern, file, cli->transport->negotiate.protocol)==0;
}
@@ -101,9 +102,9 @@ static BOOL f_info_hit;
static void listfn(struct clilist_file_info *f, const char *s, void *state)
{
- if (strcmp(f->name,".") == 0) {
+ if (ISDOT(f->name)) {
resultp[0] = '+';
- } else if (strcmp(f->name,"..") == 0) {
+ } else if (ISDOTDOT(f->name)) {
resultp[1] = '+';
} else {
resultp[2] = '+';
@@ -227,9 +228,9 @@ static void test_mask(int argc, char *argv[],
}
file[l+l2] = 0;
- if (strcmp(file+l,".") == 0 ||
- strcmp(file+l,"..") == 0 ||
- strcmp(mask+l,"..") == 0) continue;
+ if (ISDOT(file+l) || ISDOTDOT(file+l) || ISDOTDOT(mask+l)) {
+ continue;
+ }
if (strspn(file+l, ".") == strlen(file+l)) continue;