#include "lib/cmdline/popt_common.h"
#include "librpc/gen_ndr/ndr_srvsvc_c.h"
#include "librpc/gen_ndr/ndr_lsa.h"
+#include "librpc/gen_ndr/ndr_security.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/util/clilsa.h"
#include "system/dir.h"
#include "libcli/security/security.h"
#include "lib/replace/readline.h"
#include "librpc/gen_ndr/ndr_nbt.h"
-#include "librpc/gen_ndr/ndr_security.h"
static int io_bufsize = 64512;
char *p2, *s2;
BOOL ret;
- if (strcmp(string,"..") == 0)
+ if (ISDOTDOT(string))
string = ".";
- if (strcmp(pattern,".") == 0)
+ if (ISDOT(pattern))
return False;
if (is_case_sensitive)
static void adjust_do_list_queue(void)
{
+ if (do_list_queue == NULL) return;
+
/*
* If the starting point of the queue is more than half way through,
* move everything toward the beginning.
*/
- if (do_list_queue && (do_list_queue_start == do_list_queue_end))
+ if (do_list_queue_start == do_list_queue_end)
{
DEBUG(4,("do_list_queue is empty\n"));
do_list_queue_start = do_list_queue_end = 0;
do_list_fn(ctx, f);
}
if (do_list_recurse &&
- !strequal(f->name,".") &&
- !strequal(f->name,"..")) {
+ !ISDOT(f->name) &&
+ !ISDOTDOT(f->name)) {
char *mask2;
char *p;
char *mget_mask;
char *saved_curdir;
- if (strequal(finfo->name,".") || strequal(finfo->name,".."))
+ if (ISDOT(finfo->name) || ISDOTDOT(finfo->name))
return;
if (finfo->attrib & FILE_ATTRIBUTE_DIRECTORY)
if (!dir) return -1;
while ((dname = readdirname(dir))) {
- if (!strcmp("..", dname)) continue;
- if (!strcmp(".", dname)) continue;
+ if (ISDOT(dname) || ISDOTDOT(dname)) {
+ continue;
+ }
if (asprintf(&path, "%s/%s", directory, dname) <= 0) {
continue;
if (NT_STATUS_IS_ERR(smbcli_unix_chmod(ctx->cli->tree, src, mode))) {
d_printf("%s chmod file %s 0%o\n",
- smbcli_errstr(ctx->cli->tree), src, (uint_t)mode);
+ smbcli_errstr(ctx->cli->tree), src, (mode_t)mode);
return 1;
}
{
completion_remote_t *info = (completion_remote_t *)state;
- if ((info->count < MAX_COMPLETIONS - 1) && (strncmp(info->text, f->name, info->len) == 0) && (strcmp(f->name, ".") != 0) && (strcmp(f->name, "..") != 0)) {
+ if ((info->count < MAX_COMPLETIONS - 1) && (strncmp(info->text, f->name, info->len) == 0) && (!ISDOT(f->name)) && (!ISDOTDOT(f->name))) {
if ((info->dirmask[0] == 0) && !(f->attrib & FILE_ATTRIBUTE_DIRECTORY))
info->matches[info->count] = strdup(f->name);
else {