summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/client/client.c14
-rw-r--r--source3/client/clitar.c6
-rw-r--r--source3/include/smb.h1
-rw-r--r--source3/include/smb_macros.h2
-rw-r--r--source3/lib/util.c2
-rw-r--r--source3/libgpo/gpo_filesync.c2
-rw-r--r--source3/libsmb/clifile.c6
-rw-r--r--source3/libsmb/libsmb_dir.c10
-rw-r--r--source3/smbd/dir.c6
-rw-r--r--source3/smbd/dosmode.c26
-rw-r--r--source3/smbd/nttrans.c2
-rw-r--r--source3/smbd/reply.c6
-rw-r--r--source3/smbd/smb2_find.c2
-rw-r--r--source3/torture/denytest.c8
-rw-r--r--source3/torture/locktest.c2
-rw-r--r--source3/torture/locktest2.c2
-rw-r--r--source3/torture/mangle_test.c10
-rw-r--r--source3/torture/masktest.c10
-rw-r--r--source3/torture/nbio.c2
-rw-r--r--source3/torture/scanner.c4
-rw-r--r--source3/torture/torture.c208
-rw-r--r--source3/torture/utable.c8
-rw-r--r--source3/utils/net_rpc.c2
23 files changed, 170 insertions, 171 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index a12f8a2965..7269f206f5 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -924,7 +924,7 @@ NTSTATUS do_list(const char *mask,
static int cmd_dir(void)
{
TALLOC_CTX *ctx = talloc_tos();
- uint16 attribute = aDIR | aSYSTEM | aHIDDEN;
+ uint16 attribute = aDIR | aSYSTEM | FILE_ATTRIBUTE_HIDDEN;
char *mask = NULL;
char *buf = NULL;
int rc = 1;
@@ -974,7 +974,7 @@ static int cmd_dir(void)
static int cmd_du(void)
{
TALLOC_CTX *ctx = talloc_tos();
- uint16 attribute = aDIR | aSYSTEM | aHIDDEN;
+ uint16 attribute = aDIR | aSYSTEM | FILE_ATTRIBUTE_HIDDEN;
char *mask = NULL;
char *buf = NULL;
NTSTATUS status;
@@ -1306,7 +1306,7 @@ static NTSTATUS do_mget(struct cli_state *cli_state, struct file_info *finfo,
return NT_STATUS_NO_MEMORY;
}
- status = do_list(mget_mask, aSYSTEM | aHIDDEN | aDIR,do_mget,false, true);
+ status = do_list(mget_mask, aSYSTEM | FILE_ATTRIBUTE_HIDDEN | aDIR,do_mget,false, true);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -1395,7 +1395,7 @@ static int cmd_more(void)
static int cmd_mget(void)
{
TALLOC_CTX *ctx = talloc_tos();
- uint16 attribute = aSYSTEM | aHIDDEN;
+ uint16 attribute = aSYSTEM | FILE_ATTRIBUTE_HIDDEN;
char *mget_mask = NULL;
char *buf = NULL;
NTSTATUS status = NT_STATUS_OK;
@@ -2311,7 +2311,7 @@ static NTSTATUS do_del(struct cli_state *cli_state, struct file_info *finfo,
return NT_STATUS_OK;
}
- status = cli_unlink(cli_state, mask, aSYSTEM | aHIDDEN);
+ status = cli_unlink(cli_state, mask, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(status)) {
d_printf("%s deleting remote file %s\n",
nt_errstr(status), mask);
@@ -2330,7 +2330,7 @@ static int cmd_del(void)
char *mask = NULL;
char *buf = NULL;
NTSTATUS status = NT_STATUS_OK;
- uint16 attribute = aSYSTEM | aHIDDEN;
+ uint16 attribute = aSYSTEM | FILE_ATTRIBUTE_HIDDEN;
if (recurse) {
attribute |= aDIR;
@@ -4629,7 +4629,7 @@ static char **remote_completion(const char *text, int len)
if (!cli_resolve_path(ctx, "", auth_info, cli, dirmask, &targetcli, &targetpath)) {
goto cleanup;
}
- status = cli_list(targetcli, targetpath, aDIR | aSYSTEM | aHIDDEN,
+ status = cli_list(targetcli, targetpath, aDIR | aSYSTEM | FILE_ATTRIBUTE_HIDDEN,
completion_remote_filter, (void *)&info);
if (!NT_STATUS_IS_OK(status)) {
goto cleanup;
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index c29c084cce..eba9915e2a 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -70,7 +70,7 @@ extern struct cli_state *cli;
#define ATTRSET 1
#define ATTRRESET 0
-static uint16 attribute = aDIR | aSYSTEM | aHIDDEN;
+static uint16 attribute = aDIR | aSYSTEM | FILE_ATTRIBUTE_HIDDEN;
#ifndef CLIENT_TIMEOUT
#define CLIENT_TIMEOUT (30*1000)
@@ -692,7 +692,7 @@ static NTSTATUS do_atar(const char *rname_in, char *lname,
} else if (!tar_system && (finfo.mode & aSYSTEM)) {
DEBUG(4, ("skipping %s - system bit is set\n", finfo.name));
shallitime=0;
- } else if (!tar_hidden && (finfo.mode & aHIDDEN)) {
+ } else if (!tar_hidden && (finfo.mode & FILE_ATTRIBUTE_HIDDEN)) {
DEBUG(4, ("skipping %s - hidden bit is set\n", finfo.name));
shallitime=0;
} else {
@@ -1408,7 +1408,7 @@ int cmd_setmode(void)
attra[direct]|=FILE_ATTRIBUTE_READONLY;
break;
case 'h':
- attra[direct]|=aHIDDEN;
+ attra[direct]|=FILE_ATTRIBUTE_HIDDEN;
break;
case 's':
attra[direct]|=aSYSTEM;
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 61a2602fa5..148b444086 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -86,7 +86,6 @@ enum smb_read_errors {
#define DIR_STRUCT_SIZE 43
/* these define the attribute byte as seen by DOS */
-#define aHIDDEN (1L<<1) /* 0x02 */
#define aSYSTEM (1L<<2) /* 0x04 */
#define aVOLID (1L<<3) /* 0x08 */
#define aDIR (1L<<4) /* 0x10 */
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index e4dda7cb93..c949125782 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -32,7 +32,7 @@
#define IS_DOS_DIR(test_mode) (((test_mode) & aDIR) != 0)
#define IS_DOS_ARCHIVE(test_mode) (((test_mode) & aARCH) != 0)
#define IS_DOS_SYSTEM(test_mode) (((test_mode) & aSYSTEM) != 0)
-#define IS_DOS_HIDDEN(test_mode) (((test_mode) & aHIDDEN) != 0)
+#define IS_DOS_HIDDEN(test_mode) (((test_mode) & FILE_ATTRIBUTE_HIDDEN) != 0)
#define SMB_WARN(condition, message) \
((condition) ? (void)0 : \
diff --git a/source3/lib/util.c b/source3/lib/util.c
index b71be79f06..5a191ca24e 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -307,7 +307,7 @@ char *attrib_string(uint16 mode)
if (mode & aVOLID) fstrcat(attrstr,"V");
if (mode & aDIR) fstrcat(attrstr,"D");
if (mode & aARCH) fstrcat(attrstr,"A");
- if (mode & aHIDDEN) fstrcat(attrstr,"H");
+ if (mode & FILE_ATTRIBUTE_HIDDEN) fstrcat(attrstr,"H");
if (mode & aSYSTEM) fstrcat(attrstr,"S");
if (mode & FILE_ATTRIBUTE_READONLY) fstrcat(attrstr,"R");
diff --git a/source3/libgpo/gpo_filesync.c b/source3/libgpo/gpo_filesync.c
index be964a201e..b4a976840e 100644
--- a/source3/libgpo/gpo_filesync.c
+++ b/source3/libgpo/gpo_filesync.c
@@ -228,7 +228,7 @@ NTSTATUS gpo_sync_directories(TALLOC_CTX *mem_ctx,
ctx.cli = cli;
ctx.remote_path = CONST_DISCARD(char *, nt_path);
ctx.local_path = CONST_DISCARD(char *, local_path);
- ctx.attribute = (aSYSTEM | aHIDDEN | aDIR);
+ ctx.attribute = (aSYSTEM | FILE_ATTRIBUTE_HIDDEN | aDIR);
ctx.mask = talloc_asprintf(mem_ctx,
"%s\\*",
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 28f59f0d88..2c34358011 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -1134,7 +1134,7 @@ struct tevent_req *cli_rename_send(TALLOC_CTX *mem_ctx,
return NULL;
}
- SSVAL(state->vwv+0, 0, aSYSTEM | aHIDDEN | aDIR);
+ SSVAL(state->vwv+0, 0, aSYSTEM | FILE_ATTRIBUTE_HIDDEN | aDIR);
bytes = talloc_array(state, uint8_t, 1);
if (tevent_req_nomem(bytes, req)) {
@@ -1259,7 +1259,7 @@ static struct tevent_req *cli_ntrename_internal_send(TALLOC_CTX *mem_ctx,
return NULL;
}
- SSVAL(state->vwv+0, 0 ,aSYSTEM | aHIDDEN | aDIR);
+ SSVAL(state->vwv+0, 0 ,aSYSTEM | FILE_ATTRIBUTE_HIDDEN | aDIR);
SSVAL(state->vwv+1, 0, rename_flag);
bytes = talloc_array(state, uint8_t, 1);
@@ -2115,7 +2115,7 @@ struct tevent_req *cli_open_create(TALLOC_CTX *mem_ctx,
SSVAL(state->vwv + 1, 0, 0);
SSVAL(state->vwv + 2, 0, 0); /* no additional info */
SSVAL(state->vwv + 3, 0, accessmode);
- SSVAL(state->vwv + 4, 0, aSYSTEM | aHIDDEN);
+ SSVAL(state->vwv + 4, 0, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
SSVAL(state->vwv + 5, 0, 0);
SIVAL(state->vwv + 6, 0, 0);
SSVAL(state->vwv + 8, 0, openfn);
diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c
index 125bd4e2ef..abca6bccdb 100644
--- a/source3/libsmb/libsmb_dir.c
+++ b/source3/libsmb/libsmb_dir.c
@@ -816,7 +816,7 @@ SMBC_opendir_ctx(SMBCCTX *context,
}
status = cli_list(targetcli, targetpath,
- aDIR | aSYSTEM | aHIDDEN,
+ aDIR | aSYSTEM | FILE_ATTRIBUTE_HIDDEN,
dir_list_fn, (void *)dir);
if (!NT_STATUS_IS_OK(status)) {
if (dir) {
@@ -1345,7 +1345,7 @@ SMBC_rmdir_ctx(SMBCCTX *context,
}
status = cli_list(targetcli, lpath,
- aDIR | aSYSTEM | aHIDDEN,
+ aDIR | aSYSTEM | FILE_ATTRIBUTE_HIDDEN,
rmdir_list_fn,
&smbc_rmdir_dirempty);
@@ -1614,7 +1614,7 @@ SMBC_chmod_ctx(SMBCCTX *context,
if (!(newmode & (S_IWUSR | S_IWGRP | S_IWOTH))) mode |= FILE_ATTRIBUTE_READONLY;
if ((newmode & S_IXUSR) && lp_map_archive(-1)) mode |= aARCH;
if ((newmode & S_IXGRP) && lp_map_system(-1)) mode |= aSYSTEM;
- if ((newmode & S_IXOTH) && lp_map_hidden(-1)) mode |= aHIDDEN;
+ if ((newmode & S_IXOTH) && lp_map_hidden(-1)) mode |= FILE_ATTRIBUTE_HIDDEN;
if (!NT_STATUS_IS_OK(cli_setatr(targetcli, targetpath, mode, 0))) {
errno = SMBC_errno(context, targetcli);
@@ -1803,7 +1803,7 @@ SMBC_unlink_ctx(SMBCCTX *context,
}
/*d_printf(">>>unlink: resolved path as %s\n", targetpath);*/
- if (!NT_STATUS_IS_OK(cli_unlink(targetcli, targetpath, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(targetcli, targetpath, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
errno = SMBC_errno(context, targetcli);
@@ -2009,7 +2009,7 @@ SMBC_rename_ctx(SMBCCTX *ocontext,
int eno = SMBC_errno(ocontext, targetcli1);
if (eno != EEXIST ||
- !NT_STATUS_IS_OK(cli_unlink(targetcli1, targetpath2, aSYSTEM | aHIDDEN)) ||
+ !NT_STATUS_IS_OK(cli_unlink(targetcli1, targetpath2, aSYSTEM | FILE_ATTRIBUTE_HIDDEN)) ||
!NT_STATUS_IS_OK(cli_rename(targetcli1, targetpath1, targetpath2))) {
errno = eno;
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 78b16ba468..81391d0daa 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -872,15 +872,15 @@ bool dir_check_ftype(connection_struct *conn, uint32 mode, uint32 dirtype)
uint32 mask;
/* Check the "may have" search bits. */
- if (((mode & ~dirtype) & (aHIDDEN | aSYSTEM | aDIR)) != 0)
+ if (((mode & ~dirtype) & (FILE_ATTRIBUTE_HIDDEN | aSYSTEM | aDIR)) != 0)
return False;
/* Check the "must have" bits, which are the may have bits shifted eight */
/* If must have bit is set, the file/dir can not be returned in search unless the matching
file attribute is set */
- mask = ((dirtype >> 8) & (aDIR|aARCH|FILE_ATTRIBUTE_READONLY|aHIDDEN|aSYSTEM)); /* & 0x37 */
+ mask = ((dirtype >> 8) & (aDIR|aARCH|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_HIDDEN|aSYSTEM)); /* & 0x37 */
if(mask) {
- if((mask & (mode & (aDIR|aARCH|FILE_ATTRIBUTE_READONLY|aHIDDEN|aSYSTEM))) == mask) /* check if matching attribute present */
+ if((mask & (mode & (aDIR|aARCH|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_HIDDEN|aSYSTEM))) == mask) /* check if matching attribute present */
return True;
else
return False;
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index d20d77227a..8932870989 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -189,7 +189,7 @@ static uint32 dos_mode_from_sbuf(connection_struct *conn,
result |= aSYSTEM;
if (MAP_HIDDEN(conn) && ((smb_fname->st.st_ex_mode & S_IXOTH) != 0))
- result |= aHIDDEN;
+ result |= FILE_ATTRIBUTE_HIDDEN;
if (S_ISDIR(smb_fname->st.st_ex_mode))
result = aDIR | (result & FILE_ATTRIBUTE_READONLY);
@@ -198,7 +198,7 @@ static uint32 dos_mode_from_sbuf(connection_struct *conn,
DEBUG(8,("dos_mode_from_sbuf returning "));
- if (result & aHIDDEN) DEBUG(8, ("h"));
+ if (result & FILE_ATTRIBUTE_HIDDEN) DEBUG(8, ("h"));
if (result & FILE_ATTRIBUTE_READONLY ) DEBUG(8, ("r"));
if (result & aSYSTEM) DEBUG(8, ("s"));
if (result & aDIR ) DEBUG(8, ("d"));
@@ -325,7 +325,7 @@ static bool get_ea_dos_attribute(connection_struct *conn,
DEBUG(8,("get_ea_dos_attribute returning (0x%x)", dosattr));
- if (dosattr & aHIDDEN) DEBUG(8, ("h"));
+ if (dosattr & FILE_ATTRIBUTE_HIDDEN) DEBUG(8, ("h"));
if (dosattr & FILE_ATTRIBUTE_READONLY ) DEBUG(8, ("r"));
if (dosattr & aSYSTEM) DEBUG(8, ("s"));
if (dosattr & aDIR ) DEBUG(8, ("d"));
@@ -465,7 +465,7 @@ uint32 dos_mode_msdfs(connection_struct *conn,
/* Only . and .. are not hidden. */
if (p[0] == '.' && !((p[1] == '\0') ||
(p[1] == '.' && p[2] == '\0'))) {
- result |= aHIDDEN;
+ result |= FILE_ATTRIBUTE_HIDDEN;
}
}
@@ -473,9 +473,9 @@ uint32 dos_mode_msdfs(connection_struct *conn,
/* Optimization : Only call is_hidden_path if it's not already
hidden. */
- if (!(result & aHIDDEN) &&
+ if (!(result & FILE_ATTRIBUTE_HIDDEN) &&
IS_HIDDEN_PATH(conn, smb_fname->base_name)) {
- result |= aHIDDEN;
+ result |= FILE_ATTRIBUTE_HIDDEN;
}
if (result == 0) {
@@ -486,7 +486,7 @@ uint32 dos_mode_msdfs(connection_struct *conn,
DEBUG(8,("dos_mode_msdfs returning "));
- if (result & aHIDDEN) DEBUG(8, ("h"));
+ if (result & FILE_ATTRIBUTE_HIDDEN) DEBUG(8, ("h"));
if (result & FILE_ATTRIBUTE_READONLY ) DEBUG(8, ("r"));
if (result & aSYSTEM) DEBUG(8, ("s"));
if (result & aDIR ) DEBUG(8, ("d"));
@@ -509,7 +509,7 @@ int dos_attributes_to_stat_dos_flags(uint32_t dosmode)
if (dosmode & aARCH)
dos_stat_flags |= UF_DOS_ARCHIVE;
- if (dosmode & aHIDDEN)
+ if (dosmode & FILE_ATTRIBUTE_HIDDEN)
dos_stat_flags |= UF_DOS_HIDDEN;
if (dosmode & FILE_ATTRIBUTE_READONLY)
dos_stat_flags |= UF_DOS_RO;
@@ -542,7 +542,7 @@ static bool get_stat_dos_flags(connection_struct *conn,
if (smb_fname->st.st_ex_flags & UF_DOS_ARCHIVE)
*dosmode |= aARCH;
if (smb_fname->st.st_ex_flags & UF_DOS_HIDDEN)
- *dosmode |= aHIDDEN;
+ *dosmode |= FILE_ATTRIBUTE_HIDDEN;
if (smb_fname->st.st_ex_flags & UF_DOS_RO)
*dosmode |= FILE_ATTRIBUTE_READONLY;
if (smb_fname->st.st_ex_flags & UF_DOS_SYSTEM)
@@ -637,7 +637,7 @@ uint32 dos_mode(connection_struct *conn, struct smb_filename *smb_fname)
/* Only . and .. are not hidden. */
if (p[0] == '.' && !((p[1] == '\0') ||
(p[1] == '.' && p[2] == '\0'))) {
- result |= aHIDDEN;
+ result |= FILE_ATTRIBUTE_HIDDEN;
}
}
@@ -658,9 +658,9 @@ uint32 dos_mode(connection_struct *conn, struct smb_filename *smb_fname)
/* Optimization : Only call is_hidden_path if it's not already
hidden. */
- if (!(result & aHIDDEN) &&
+ if (!(result & FILE_ATTRIBUTE_HIDDEN) &&
IS_HIDDEN_PATH(conn, smb_fname->base_name)) {
- result |= aHIDDEN;
+ result |= FILE_ATTRIBUTE_HIDDEN;
}
if (result == 0) {
@@ -671,7 +671,7 @@ uint32 dos_mode(connection_struct *conn, struct smb_filename *smb_fname)
DEBUG(8,("dos_mode returning "));
- if (result & aHIDDEN) DEBUG(8, ("h"));
+ if (result & FILE_ATTRIBUTE_HIDDEN) DEBUG(8, ("h"));
if (result & FILE_ATTRIBUTE_READONLY ) DEBUG(8, ("r"));
if (result & aSYSTEM) DEBUG(8, ("s"));
if (result & aDIR ) DEBUG(8, ("d"));
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 71f20ac77e..6fdefaad43 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1363,7 +1363,7 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
/* Ensure attributes match. */
fattr = dos_mode(conn, smb_fname_src);
- if ((fattr & ~attrs) & (aHIDDEN | aSYSTEM)) {
+ if ((fattr & ~attrs) & (FILE_ATTRIBUTE_HIDDEN | aSYSTEM)) {
status = NT_STATUS_NO_SUCH_FILE;
goto out;
}
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 8dba6be943..6b6030d294 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1108,7 +1108,7 @@ void reply_getatr(struct smb_request *req)
/* dos smetimes asks for a stat of "" - it returns a "hidden directory"
under WfWg - weird! */
if (*fname == '\0') {
- mode = aHIDDEN | aDIR;
+ mode = FILE_ATTRIBUTE_HIDDEN | aDIR;
if (!CAN_WRITE(conn)) {
mode |= FILE_ATTRIBUTE_READONLY;
}
@@ -2388,7 +2388,7 @@ static NTSTATUS can_rename(connection_struct *conn, files_struct *fsp,
}
fmode = dos_mode(conn, fsp->fsp_name);
- if ((fmode & ~dirtype) & (aHIDDEN | aSYSTEM)) {
+ if ((fmode & ~dirtype) & (FILE_ATTRIBUTE_HIDDEN | aSYSTEM)) {
return NT_STATUS_NO_SUCH_FILE;
}
@@ -2452,7 +2452,7 @@ static NTSTATUS do_unlink(connection_struct *conn,
dirtype = aDIR|aARCH|FILE_ATTRIBUTE_READONLY;
}
- dirtype &= (aDIR|aARCH|FILE_ATTRIBUTE_READONLY|aHIDDEN|aSYSTEM);
+ dirtype &= (aDIR|aARCH|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_HIDDEN|aSYSTEM);
if (!dirtype) {
return NT_STATUS_NO_SUCH_FILE;
}
diff --git a/source3/smbd/smb2_find.c b/source3/smbd/smb2_find.c
index 3ac573c213..c0873dee1f 100644
--- a/source3/smbd/smb2_find.c
+++ b/source3/smbd/smb2_find.c
@@ -228,7 +228,7 @@ static struct tevent_req *smbd_smb2_find_send(TALLOC_CTX *mem_ctx,
int last_entry_off = 0;
int off = 0;
uint32_t num = 0;
- uint32_t dirtype = aHIDDEN | aSYSTEM | aDIR;
+ uint32_t dirtype = FILE_ATTRIBUTE_HIDDEN | aSYSTEM | aDIR;
bool dont_descend = false;
bool ask_sharemode = true;
diff --git a/source3/torture/denytest.c b/source3/torture/denytest.c
index 63448d44f3..e260a6104b 100644
--- a/source3/torture/denytest.c
+++ b/source3/torture/denytest.c
@@ -1421,7 +1421,7 @@ bool torture_denytest1(int dummy)
printf("starting denytest1\n");
for (i=0;i<2;i++) {
- cli_unlink(cli1, fnames[i], aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fnames[i], aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_open(cli1, fnames[i], O_RDWR|O_CREAT, DENY_NONE, &fnum1);
cli_writeall(cli1, fnum1, 0, (uint8_t *)fnames[i], 0,
strlen(fnames[i]), NULL);
@@ -1484,7 +1484,7 @@ bool torture_denytest1(int dummy)
}
for (i=0;i<2;i++) {
- cli_unlink(cli1, fnames[i], aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fnames[i], aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
}
if (!torture_close_connection(cli1)) {
@@ -1515,7 +1515,7 @@ bool torture_denytest2(int dummy)
printf("starting denytest2\n");
for (i=0;i<2;i++) {
- cli_unlink(cli1, fnames[i], aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fnames[i], aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_open(cli1, fnames[i], O_RDWR|O_CREAT, DENY_NONE, &fnum1);
cli_writeall(cli1, fnum1, 0, (uint8_t *)fnames[i], 0,
strlen(fnames[i]), NULL);
@@ -1576,7 +1576,7 @@ bool torture_denytest2(int dummy)
}
for (i=0;i<2;i++) {
- cli_unlink(cli1, fnames[i], aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fnames[i], aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
}
if (!torture_close_connection(cli1)) {
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index d52a8de460..13cf7212b9 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -400,7 +400,7 @@ static void close_files(struct cli_state *cli[NSERVERS][NCONNECTIONS],
}
}
for (server=0;server<NSERVERS;server++) {
- cli_unlink(cli[server][0], FILENAME, aSYSTEM | aHIDDEN);
+ cli_unlink(cli[server][0], FILENAME, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
}
}
diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c
index 55dc1d52b7..82002c8aed 100644
--- a/source3/torture/locktest2.c
+++ b/source3/torture/locktest2.c
@@ -325,7 +325,7 @@ static void close_files(struct cli_state *cli[NSERVERS][NCONNECTIONS],
}
}
for (server=0;server<NSERVERS;server++) {
- cli_unlink(cli[server][0], FILENAME, aSYSTEM | aHIDDEN);
+ cli_unlink(cli[server][0], FILENAME, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
}
}
diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c
index dd68467140..8b6c405c5b 100644
--- a/source3/torture/mangle_test.c
+++ b/source3/torture/mangle_test.c
@@ -58,7 +58,7 @@ static bool test_one(struct cli_state *cli, const char *name)
}
fstr_sprintf(name2, "\\mangle_test\\%s", shortname);
- if (!NT_STATUS_IS_OK(cli_unlink(cli, name2, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(cli, name2, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink of %s (%s) failed (%s)\n",
name2, name, cli_errstr(cli));
return False;
@@ -75,11 +75,11 @@ static bool test_one(struct cli_state *cli, const char *name)
}
/* and unlink by long name */
- if (!NT_STATUS_IS_OK(cli_unlink(cli, name, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(cli, name, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink2 of %s (%s) failed (%s)\n",
name, name2, cli_errstr(cli));
failures++;
- cli_unlink(cli, name2, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, name2, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
return True;
}
@@ -178,7 +178,7 @@ bool torture_mangle(int dummy)
return False;
}
- cli_unlink(cli, "\\mangle_test\\*", aSYSTEM | aHIDDEN);
+ cli_unlink(cli, "\\mangle_test\\*", aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_rmdir(cli, "\\mangle_test");
if (!NT_STATUS_IS_OK(cli_mkdir(cli, "\\mangle_test"))) {
@@ -202,7 +202,7 @@ bool torture_mangle(int dummy)
}
}
- cli_unlink(cli, "\\mangle_test\\*", aSYSTEM | aHIDDEN);
+ cli_unlink(cli, "\\mangle_test\\*", aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_rmdir(cli, "\\mangle_test"))) {
printf("ERROR: Failed to remove directory\n");
return False;
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index c8f346435a..a80fec90f9 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -313,11 +313,11 @@ static void get_real_name(struct cli_state *cli,
*pp_long_name = NULL;
/* nasty hack to force level 260 listings - tridge */
if (max_protocol <= PROTOCOL_LANMAN1) {
- cli_list_trans(cli, "\\masktest\\*.*", aHIDDEN | aDIR,
+ cli_list_trans(cli, "\\masktest\\*.*", FILE_ATTRIBUTE_HIDDEN | aDIR,
SMB_FIND_FILE_BOTH_DIRECTORY_INFO, listfn,
&state);
} else {
- cli_list_trans(cli, "\\masktest\\*", aHIDDEN | aDIR,
+ cli_list_trans(cli, "\\masktest\\*", FILE_ATTRIBUTE_HIDDEN | aDIR,
SMB_FIND_FILE_BOTH_DIRECTORY_INFO,
listfn, &state);
}
@@ -359,7 +359,7 @@ static void testpair(struct cli_state *cli, const char *mask, const char *file)
return;
}
fstrcpy(res1, "---");
- cli_list(cli, mask, aHIDDEN | aDIR, listfn, NULL);
+ cli_list(cli, mask, FILE_ATTRIBUTE_HIDDEN | aDIR, listfn, NULL);
res2 = reg_test(cli, mask, long_name, short_name);
@@ -371,7 +371,7 @@ static void testpair(struct cli_state *cli, const char *mask, const char *file)
if (die_on_error) exit(1);
}
- cli_unlink(cli, file, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, file, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (count % 100 == 0) DEBUG(0,("%d\n", count));
SAFE_FREE(long_name);
@@ -388,7 +388,7 @@ static void test_mask(int argc, char *argv[],
cli_mkdir(cli, "\\masktest");
- cli_unlink(cli, "\\masktest\\*", aSYSTEM | aHIDDEN);
+ cli_unlink(cli, "\\masktest\\*", aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (argc >= 2) {
while (argc >= 2) {
diff --git a/source3/torture/nbio.c b/source3/torture/nbio.c
index 49ac4b5cec..ed1a3aa5f3 100644
--- a/source3/torture/nbio.c
+++ b/source3/torture/nbio.c
@@ -134,7 +134,7 @@ void nb_setup(struct cli_state *cli)
void nb_unlink(const char *fname)
{
- if (!NT_STATUS_IS_OK(cli_unlink(c, fname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(c, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
#if NBDEBUG
printf("(%d) unlink %s failed (%s)\n",
line_count, fname, cli_errstr(c));
diff --git a/source3/torture/scanner.c b/source3/torture/scanner.c
index c7d3ebc291..5e06cb5878 100644
--- a/source3/torture/scanner.c
+++ b/source3/torture/scanner.c
@@ -172,7 +172,7 @@ static bool scan_trans2(struct cli_state *cli, int op, int level,
status = try_trans2_len(cli, "newfile", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
- cli_unlink(cli, "\\newfile.dat", aSYSTEM | aHIDDEN);
+ cli_unlink(cli, "\\newfile.dat", aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_rmdir(cli, "\\newfile.dat");
if (NT_STATUS_IS_OK(status)) return True;
@@ -379,7 +379,7 @@ static bool scan_nttrans(struct cli_state *cli, int op, int level,
status = try_nttrans_len(cli, "newfile", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
- cli_unlink(cli, "\\newfile.dat", aSYSTEM | aHIDDEN);
+ cli_unlink(cli, "\\newfile.dat", aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_rmdir(cli, "\\newfile.dat");
if (NT_STATUS_IS_OK(status)) return True;
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 0e81f49c71..83e2f8a633 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -629,7 +629,7 @@ static bool rw_torture(struct cli_state *c)
correct = False;
}
- if (!NT_STATUS_IS_OK(cli_unlink(c, fname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(c, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink failed (%s)\n", cli_errstr(c));
correct = False;
}
@@ -641,7 +641,7 @@ static bool rw_torture(struct cli_state *c)
}
cli_close(c, fnum2);
- cli_unlink(c, lockfname, aSYSTEM | aHIDDEN);
+ cli_unlink(c, lockfname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
printf("%d\n", i);
@@ -686,7 +686,7 @@ static bool rw_torture3(struct cli_state *c, char *lockfname)
if (procnum == 0)
{
- if (!NT_STATUS_IS_OK(cli_unlink(c, lockfname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(c, lockfname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink failed (%s) (normal, this file should not exist)\n", cli_errstr(c));
}
@@ -786,7 +786,7 @@ static bool rw_torture2(struct cli_state *c1, struct cli_state *c2)
bool correct = True;
ssize_t bytes_read;
- if (!NT_STATUS_IS_OK(cli_unlink(c1, lockfname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(c1, lockfname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink failed (%s) (normal, this file should not exist)\n", cli_errstr(c1));
}
@@ -847,7 +847,7 @@ static bool rw_torture2(struct cli_state *c1, struct cli_state *c2)
correct = False;
}
- if (!NT_STATUS_IS_OK(cli_unlink(c1, lockfname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(c1, lockfname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink failed (%s)\n", cli_errstr(c1));
correct = False;
}
@@ -933,7 +933,7 @@ static bool run_readwritelarge_internal(int max_xmit_k)
printf("starting readwritelarge_internal\n");
- cli_unlink(cli1, lockfname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, lockfname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_open(cli1, lockfname, O_RDWR | O_CREAT | O_EXCL, DENY_NONE, &fnum1))) {
printf("open read/write of %s failed (%s)\n", lockfname, cli_errstr(cli1));
@@ -963,7 +963,7 @@ static bool run_readwritelarge_internal(int max_xmit_k)
correct = False;
}
- if (!NT_STATUS_IS_OK(cli_unlink(cli1, lockfname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(cli1, lockfname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink failed (%s)\n", cli_errstr(cli1));
correct = False;
}
@@ -1180,7 +1180,7 @@ static bool run_locktest1(int dummy)
printf("starting locktest1\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_open(cli1, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE, &fnum1))) {
printf("open of %s failed (%s)\n", fname, cli_errstr(cli1));
@@ -1252,7 +1252,7 @@ static bool run_locktest1(int dummy)
return False;
}
- if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink failed (%s)\n", cli_errstr(cli1));
return False;
}
@@ -1294,7 +1294,7 @@ static bool run_tcon_test(int dummy)
printf("starting tcontest\n");
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_open(cli, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE, &fnum1))) {
printf("open of %s failed (%s)\n", fname, cli_errstr(cli));
@@ -1561,7 +1561,7 @@ static bool run_locktest2(int dummy)
printf("starting locktest2\n");
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_setpid(cli, 1);
@@ -1698,7 +1698,7 @@ static bool run_locktest3(int dummy)
printf("starting locktest3\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_open(cli1, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE, &fnum1))) {
printf("open of %s failed (%s)\n", fname, cli_errstr(cli1));
@@ -1778,7 +1778,7 @@ static bool run_locktest3(int dummy)
return False;
}
- if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink failed (%s)\n", cli_errstr(cli1));
return False;
}
@@ -1822,7 +1822,7 @@ static bool run_locktest4(int dummy)
printf("starting locktest4\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_open(cli1, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE, &fnum1);
cli_open(cli2, fname, O_RDWR, DENY_NONE, &fnum2);
@@ -1974,7 +1974,7 @@ static bool run_locktest4(int dummy)
fail:
cli_close(cli1, fnum1);
cli_close(cli2, fnum2);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
torture_close_connection(cli1);
torture_close_connection(cli2);
@@ -2004,7 +2004,7 @@ static bool run_locktest5(int dummy)
printf("starting locktest5\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_open(cli1, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE, &fnum1);
cli_open(cli2, fname, O_RDWR, DENY_NONE, &fnum2);
@@ -2096,7 +2096,7 @@ static bool run_locktest5(int dummy)
fail:
cli_close(cli1, fnum1);
cli_close(cli2, fnum2);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!torture_close_connection(cli1)) {
correct = False;
}
@@ -2131,7 +2131,7 @@ static bool run_locktest6(int dummy)
for (i=0;i<1;i++) {
printf("Testing %s\n", fname[i]);
- cli_unlink(cli, fname[i], aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname[i], aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_open(cli, fname[i], O_RDWR|O_CREAT|O_EXCL, DENY_NONE, &fnum);
status = cli_locktype(cli, fnum, 0, 8, 0, LOCKING_ANDX_CHANGE_LOCKTYPE);
@@ -2143,7 +2143,7 @@ static bool run_locktest6(int dummy)
cli_close(cli, fnum);
printf("CANCEL_LOCK gave %s\n", nt_errstr(status));
- cli_unlink(cli, fname[i], aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname[i], aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
}
torture_close_connection(cli);
@@ -2169,7 +2169,7 @@ static bool run_locktest7(int dummy)
printf("starting locktest7\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_open(cli1, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE, &fnum1);
@@ -2289,7 +2289,7 @@ static bool run_locktest7(int dummy)
fail:
cli_close(cli1, fnum1);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
torture_close_connection(cli1);
printf("finished locktest7\n");
@@ -2321,7 +2321,7 @@ static bool run_locktest8(int dummy)
printf("starting locktest8\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
status = cli_open(cli1, fname, O_RDWR|O_CREAT|O_EXCL, DENY_WRITE,
&fnum1);
@@ -2363,7 +2363,7 @@ static bool run_locktest8(int dummy)
fail:
cli_close(cli1, fnum1);
cli_close(cli1, fnum2);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
torture_close_connection(cli1);
printf("finished locktest8\n");
@@ -2593,7 +2593,7 @@ static bool run_fdpasstest(int dummy)
printf("starting fdpasstest\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_open(cli1, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE, &fnum1))) {
printf("open of %s failed (%s)\n", fname, cli_errstr(cli1));
@@ -2618,7 +2618,7 @@ static bool run_fdpasstest(int dummy)
}
cli_close(cli1, fnum1);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
torture_close_connection(cli1);
torture_close_connection(cli2);
@@ -2657,8 +2657,8 @@ static bool run_fdsesstest(int dummy)
printf("starting fdsesstest\n");
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
- cli_unlink(cli, fname1, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
+ cli_unlink(cli, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_open(cli, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE, &fnum1))) {
printf("open of %s failed (%s)\n", fname, cli_errstr(cli));
@@ -2684,7 +2684,7 @@ static bool run_fdsesstest(int dummy)
if (NT_STATUS_IS_OK(cli_open(cli, fname1, O_RDWR|O_CREAT|O_EXCL, DENY_NONE, &fnum2))) {
printf("create with different vuid, same cnum succeeded.\n");
cli_close(cli, fnum2);
- cli_unlink(cli, fname1, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
} else {
printf("create with different vuid, same cnum failed.\n");
printf("This will cause problems with service clients.\n");
@@ -2704,7 +2704,7 @@ static bool run_fdsesstest(int dummy)
cli->cnum = saved_cnum;
cli_close(cli, fnum1);
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
torture_close_connection(cli);
@@ -2732,7 +2732,7 @@ static bool run_unlinktest(int dummy)
printf("starting unlink test\n");
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_setpid(cli, 1);
@@ -2741,7 +2741,7 @@ static bool run_unlinktest(int dummy)
return False;
}
- if (NT_STATUS_IS_OK(cli_unlink(cli, fname, aSYSTEM | aHIDDEN))) {
+ if (NT_STATUS_IS_OK(cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("error: server allowed unlink on an open file\n");
correct = False;
} else {
@@ -2750,7 +2750,7 @@ static bool run_unlinktest(int dummy)
}
cli_close(cli, fnum);
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!torture_close_connection(cli)) {
correct = False;
@@ -2802,7 +2802,7 @@ static bool run_maxfidtest(int dummy)
for (;i>=0;i--) {
slprintf(fname,sizeof(fname)-1,ftemplate, i,(int)getpid());
cli_close(cli, fnums[i]);
- if (!NT_STATUS_IS_OK(cli_unlink(cli, fname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink of %s failed (%s)\n",
fname, cli_errstr(cli));
correct = False;
@@ -2998,7 +2998,7 @@ static bool run_attrtest(int dummy)
return False;
}
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_open(cli, fname,
O_RDWR | O_CREAT | O_TRUNC, DENY_NONE, &fnum);
cli_close(cli, fnum);
@@ -3033,7 +3033,7 @@ static bool run_attrtest(int dummy)
correct = True;
}
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!torture_close_connection(cli)) {
correct = False;
@@ -3076,7 +3076,7 @@ static bool run_trans2test(int dummy)
correct = false;
}
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_open(cli, fname,
O_RDWR | O_CREAT | O_TRUNC, DENY_NONE, &fnum);
if (!NT_STATUS_IS_OK(cli_qfileinfo_basic(
@@ -3102,7 +3102,7 @@ static bool run_trans2test(int dummy)
sleep(2);
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_open(cli, fname,
O_RDWR | O_CREAT | O_TRUNC, DENY_NONE, &fnum))) {
printf("open of %s failed (%s)\n", fname, cli_errstr(cli));
@@ -3134,7 +3134,7 @@ static bool run_trans2test(int dummy)
}
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_open(cli, fname,
O_RDWR | O_CREAT | O_TRUNC, DENY_NONE, &fnum);
cli_close(cli, fnum);
@@ -3151,7 +3151,7 @@ static bool run_trans2test(int dummy)
}
}
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
/* check if the server updates the directory modification time
@@ -3184,7 +3184,7 @@ static bool run_trans2test(int dummy)
correct = False;
}
}
- cli_unlink(cli, fname2, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname2, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_rmdir(cli, dname);
if (!torture_close_connection(cli)) {
@@ -3269,7 +3269,7 @@ static bool run_oplock1(int dummy)
return False;
}
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_sockopt(cli1, sockops);
@@ -3282,15 +3282,15 @@ static bool run_oplock1(int dummy)
cli1->use_oplocks = False;
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_close(cli1, fnum1))) {
printf("close2 failed (%s)\n", cli_errstr(cli1));
return False;
}
- if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink failed (%s)\n", cli_errstr(cli1));
return False;
}
@@ -3340,7 +3340,7 @@ static bool run_oplock2(int dummy)
cli2->use_oplocks = True;
cli2->use_level_II_oplocks = True;
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_sockopt(cli1, sockops);
cli_sockopt(cli2, sockops);
@@ -3412,7 +3412,7 @@ static bool run_oplock2(int dummy)
sleep(4);
- if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink failed (%s)\n", cli_errstr(cli1));
correct = False;
}
@@ -3526,8 +3526,8 @@ static bool run_oplock4(int dummy)
return false;
}
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
- cli_unlink(cli1, fname_ln, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
+ cli_unlink(cli1, fname_ln, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_sockopt(cli1, sockops);
cli_sockopt(cli2, sockops);
@@ -3611,11 +3611,11 @@ static bool run_oplock4(int dummy)
correct = false;
}
- if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink failed (%s)\n", cli_errstr(cli1));
correct = false;
}
- if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname_ln, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname_ln, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink failed (%s)\n", cli_errstr(cli1));
correct = false;
}
@@ -3657,7 +3657,7 @@ static bool run_deletetest(int dummy)
/* Test 1 - this should delete the file on close. */
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, GENERIC_ALL_ACCESS|DELETE_ACCESS, FILE_ATTRIBUTE_NORMAL,
0, FILE_OVERWRITE_IF,
@@ -3684,7 +3684,7 @@ static bool run_deletetest(int dummy)
/* Test 2 - this should delete the file on close. */
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, GENERIC_ALL_ACCESS,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
@@ -3713,13 +3713,13 @@ static bool run_deletetest(int dummy)
correct = False;
goto fail;
}
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
} else
printf("second delete on close test succeeded.\n");
/* Test 3 - ... */
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, GENERIC_ALL_ACCESS, FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OVERWRITE_IF, 0, 0, &fnum1))) {
@@ -3772,7 +3772,7 @@ static bool run_deletetest(int dummy)
if (!NT_STATUS_IS_OK(cli_close(cli1, fnum1))) {
printf("[3] close failed (%s)\n", cli_errstr(cli1));
}
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
correct = False;
goto fail;
} else
@@ -3780,7 +3780,7 @@ static bool run_deletetest(int dummy)
/* Test 4 ... */
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, FILE_READ_DATA|FILE_WRITE_DATA|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OVERWRITE_IF, 0, 0, &fnum1))) {
@@ -3827,7 +3827,7 @@ static bool run_deletetest(int dummy)
/* Test 5 ... */
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_open(cli1, fname, O_RDWR|O_CREAT, DENY_NONE, &fnum1))) {
printf("[5] open of %s failed (%s)\n", fname, cli_errstr(cli1));
@@ -3853,7 +3853,7 @@ static bool run_deletetest(int dummy)
/* Test 6 ... */
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, FILE_READ_DATA|FILE_WRITE_DATA,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
@@ -3881,7 +3881,7 @@ static bool run_deletetest(int dummy)
/* Test 7 ... */
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, FILE_READ_DATA|FILE_WRITE_DATA|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL, 0, FILE_OVERWRITE_IF, 0, 0, &fnum1))) {
@@ -3926,7 +3926,7 @@ static bool run_deletetest(int dummy)
/* Test 7 ... */
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!torture_open_connection(&cli2, 1)) {
printf("[8] failed to open second connection.\n");
@@ -4011,7 +4011,7 @@ static bool run_deletetest(int dummy)
printf("tenth delete on close test succeeded.\n");
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
/* What error do we get when attempting to open a read-only file with
delete access ? */
@@ -4059,7 +4059,7 @@ static bool run_deletetest(int dummy)
if (fnum1 != (uint16_t)-1) cli_close(cli1, fnum1);
if (fnum2 != (uint16_t)-1) cli_close(cli1, fnum2);
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (cli1 && !torture_close_connection(cli1)) {
correct = False;
@@ -4087,8 +4087,8 @@ static bool run_deletetest_ln(int dummy)
return false;
}
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
- cli_unlink(cli, fname_ln, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
+ cli_unlink(cli, fname_ln, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_sockopt(cli, sockops);
@@ -4169,8 +4169,8 @@ static bool run_deletetest_ln(int dummy)
correct = False;
}
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
- cli_unlink(cli, fname_ln, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
+ cli_unlink(cli, fname_ln, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!torture_close_connection(cli)) {
correct = false;
@@ -4287,8 +4287,8 @@ static bool run_rename(int dummy)
return False;
}
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
- cli_unlink(cli1, fname1, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
+ cli_unlink(cli1, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS, FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ, FILE_OVERWRITE_IF, 0, 0, &fnum1))) {
printf("First open failed - %s\n", cli_errstr(cli1));
@@ -4307,8 +4307,8 @@ static bool run_rename(int dummy)
return False;
}
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
- cli_unlink(cli1, fname1, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
+ cli_unlink(cli1, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
status = cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS, FILE_ATTRIBUTE_NORMAL,
#if 0
FILE_SHARE_DELETE|FILE_SHARE_NONE,
@@ -4333,8 +4333,8 @@ static bool run_rename(int dummy)
return False;
}
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
- cli_unlink(cli1, fname1, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
+ cli_unlink(cli1, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, READ_CONTROL_ACCESS, FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_NONE, FILE_OVERWRITE_IF, 0, 0, &fnum1))) {
@@ -4376,8 +4376,8 @@ static bool run_rename(int dummy)
return False;
}
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
- cli_unlink(cli1, fname1, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
+ cli_unlink(cli1, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
/*----*/
@@ -4399,8 +4399,8 @@ static bool run_rename(int dummy)
return False;
}
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
- cli_unlink(cli1, fname1, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
+ cli_unlink(cli1, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
/*--*/
@@ -4457,8 +4457,8 @@ static bool run_rename(int dummy)
}
}
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
- cli_unlink(cli1, fname1, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
+ cli_unlink(cli1, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!torture_close_connection(cli1)) {
correct = False;
@@ -4517,7 +4517,7 @@ static bool run_opentest(int dummy)
}
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_sockopt(cli1, sockops);
@@ -4575,7 +4575,7 @@ static bool run_opentest(int dummy)
return False;
}
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
printf("finished open test 2\n");
@@ -4636,7 +4636,7 @@ static bool run_opentest(int dummy)
}
printf("finished open test 3\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
printf("Do ctemp tests\n");
if (!NT_STATUS_IS_OK(cli_ctemp(cli1, talloc_tos(), "\\", &fnum1, &tmp_path))) {
@@ -4647,7 +4647,7 @@ static bool run_opentest(int dummy)
if (!NT_STATUS_IS_OK(cli_close(cli1, fnum1))) {
printf("close of temp failed (%s)\n", cli_errstr(cli1));
}
- if (!NT_STATUS_IS_OK(cli_unlink(cli1, tmp_path, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(cli1, tmp_path, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
printf("unlink of temp failed (%s)\n", cli_errstr(cli1));
}
@@ -4658,7 +4658,7 @@ static bool run_opentest(int dummy)
}
cli_setatr(cli2, fname, 0, 0);
- cli_unlink(cli2, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli2, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_sockopt(cli2, sockops);
@@ -4687,7 +4687,7 @@ static bool run_opentest(int dummy)
printf("non-io open test #1 passed.\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
printf("TEST #2 testing 2 non-io opens (first with delete)\n");
@@ -4714,7 +4714,7 @@ static bool run_opentest(int dummy)
printf("non-io open test #2 passed.\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
printf("TEST #3 testing 2 non-io opens (second with delete)\n");
@@ -4741,7 +4741,7 @@ static bool run_opentest(int dummy)
printf("non-io open test #3 passed.\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
printf("TEST #4 testing 2 non-io opens (both with delete)\n");
@@ -4766,7 +4766,7 @@ static bool run_opentest(int dummy)
printf("non-io open test #4 passed.\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
printf("TEST #5 testing 2 non-io opens (both with delete - both with file share delete)\n");
@@ -4796,7 +4796,7 @@ static bool run_opentest(int dummy)
printf("TEST #6 testing 1 non-io open, one io open\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, FILE_READ_DATA, FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_NONE, FILE_OVERWRITE_IF, 0, 0, &fnum1))) {
@@ -4824,7 +4824,7 @@ static bool run_opentest(int dummy)
printf("TEST #7 testing 1 non-io open, one io open with delete\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, FILE_READ_DATA, FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_NONE, FILE_OVERWRITE_IF, 0, 0, &fnum1))) {
@@ -4847,7 +4847,7 @@ static bool run_opentest(int dummy)
printf("non-io open test #7 passed.\n");
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
printf("TEST #8 testing open without WRITE_ATTRIBUTES, updating close write time.\n");
status = cli_ntcreate(cli1, fname, 0, FILE_WRITE_DATA, FILE_ATTRIBUTE_NORMAL,
@@ -5220,7 +5220,7 @@ static bool run_openattrtest(int dummy)
for (k = 0, i = 0; i < sizeof(open_attrs_table)/sizeof(uint32); i++) {
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, FILE_WRITE_DATA, open_attrs_table[i],
FILE_SHARE_NONE, FILE_OVERWRITE_IF, 0, 0, &fnum1))) {
printf("open %d (1) of %s failed (%s)\n", i, fname, cli_errstr(cli1));
@@ -5292,7 +5292,7 @@ static bool run_openattrtest(int dummy)
}
cli_setatr(cli1, fname, 0, 0);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
printf("open attr test %s.\n", correct ? "passed" : "failed");
@@ -5363,7 +5363,7 @@ static bool run_dirtest(int dummy)
for (i=0;i<torture_numops;i++) {
fstring fname;
slprintf(fname, sizeof(fname), "\\%x", (int)random());
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
}
if (!torture_close_connection(cli)) {
@@ -5389,7 +5389,7 @@ static NTSTATUS del_fn(const char *mnt, struct file_info *finfo, const char *mas
if (!NT_STATUS_IS_OK(cli_rmdir(pcli, fname)))
printf("del_fn: failed to rmdir %s\n,", fname );
} else {
- if (!NT_STATUS_IS_OK(cli_unlink(pcli, fname, aSYSTEM | aHIDDEN)))
+ if (!NT_STATUS_IS_OK(cli_unlink(pcli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN)))
printf("del_fn: failed to unlink %s\n,", fname );
}
return NT_STATUS_OK;
@@ -5414,7 +5414,7 @@ bool torture_ioctl_test(int dummy)
printf("starting ioctl test\n");
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_open(cli, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE, &fnum))) {
printf("open of %s failed (%s)\n", fname, cli_errstr(cli));
@@ -5467,7 +5467,7 @@ bool torture_chkpath_test(int dummy)
/* cleanup from an old run */
cli_rmdir(cli, "\\chkpath.dir\\dir2");
- cli_unlink(cli, "\\chkpath.dir\\*", aSYSTEM | aHIDDEN);
+ cli_unlink(cli, "\\chkpath.dir\\*", aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_rmdir(cli, "\\chkpath.dir");
if (!NT_STATUS_IS_OK(cli_mkdir(cli, "\\chkpath.dir"))) {
@@ -5521,7 +5521,7 @@ bool torture_chkpath_test(int dummy)
}
cli_rmdir(cli, "\\chkpath.dir\\dir2");
- cli_unlink(cli, "\\chkpath.dir\\*", aSYSTEM | aHIDDEN);
+ cli_unlink(cli, "\\chkpath.dir\\*", aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_rmdir(cli, "\\chkpath.dir");
if (!torture_close_connection(cli)) {
@@ -5550,7 +5550,7 @@ static bool run_eatest(int dummy)
return False;
}
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli, fname, 0,
FIRST_DESIRED_ACCESS, FILE_ATTRIBUTE_ARCHIVE,
FILE_SHARE_NONE, FILE_OVERWRITE_IF,
@@ -6587,7 +6587,7 @@ static bool run_windows_write(int dummy)
ret = true;
fail:
cli_close(cli1, fnum);
- cli_unlink(cli1, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
torture_close_connection(cli1);
return ret;
}
@@ -6720,7 +6720,7 @@ static NTSTATUS shortname_del_fn(const char *mnt, struct file_info *finfo,
printf("del_fn: failed to rmdir %s\n,", fname );
}
} else {
- status = cli_unlink(pcli, fname, aSYSTEM | aHIDDEN);
+ status = cli_unlink(pcli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (!NT_STATUS_IS_OK(status)) {
printf("del_fn: failed to unlink %s\n,", fname );
}
@@ -6824,7 +6824,7 @@ static bool run_shortname_test(int dummy)
correct = false;
goto out;
}
- if (!NT_STATUS_IS_OK(cli_unlink(cli, fname, aSYSTEM | aHIDDEN))) {
+ if (!NT_STATUS_IS_OK(cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
d_printf("(%s) failed to delete %s: %s\n",
__location__, fname, cli_errstr(cli));
correct = false;
@@ -6969,7 +6969,7 @@ static bool run_dir_createtime(int dummy)
return false;
}
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_rmdir(cli, dname);
status = cli_mkdir(cli, dname);
@@ -7013,7 +7013,7 @@ static bool run_dir_createtime(int dummy)
out:
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_rmdir(cli, dname);
if (!torture_close_connection(cli)) {
ret = false;
@@ -7038,7 +7038,7 @@ static bool run_streamerror(int dummy)
return false;
}
- cli_unlink(cli, "\\testdir\\*", aSYSTEM | aHIDDEN);
+ cli_unlink(cli, "\\testdir\\*", aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_rmdir(cli, dname);
status = cli_mkdir(cli, dname);
diff --git a/source3/torture/utable.c b/source3/torture/utable.c
index d4d5117bd1..ed1c4b80de 100644
--- a/source3/torture/utable.c
+++ b/source3/torture/utable.c
@@ -42,7 +42,7 @@ bool torture_utable(int dummy)
memset(valid, 0, sizeof(valid));
cli_mkdir(cli, "\\utable");
- cli_unlink(cli, "\\utable\\*", aSYSTEM | aHIDDEN);
+ cli_unlink(cli, "\\utable\\*", aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
for (c=1; c < 0x10000; c++) {
size_t size = 0;
@@ -77,7 +77,7 @@ bool torture_utable(int dummy)
}
cli_close(cli, fnum);
- cli_unlink(cli, fname, aSYSTEM | aHIDDEN);
+ cli_unlink(cli, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
if (c % 100 == 0) {
printf("%d (%d/%d)\r", c, chars_allowed, alt_allowed);
@@ -144,7 +144,7 @@ bool torture_casetable(int dummy)
memset(equiv, 0, sizeof(equiv));
- cli_unlink(cli, "\\utable\\*", aSYSTEM | aHIDDEN);
+ cli_unlink(cli, "\\utable\\*", aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_rmdir(cli, "\\utable");
if (!NT_STATUS_IS_OK(cli_mkdir(cli, "\\utable"))) {
printf("Failed to create utable directory!\n");
@@ -203,7 +203,7 @@ bool torture_casetable(int dummy)
cli_close(cli, fnum);
}
- cli_unlink(cli, "\\utable\\*", aSYSTEM | aHIDDEN);
+ cli_unlink(cli, "\\utable\\*", aSYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_rmdir(cli, "\\utable");
return True;
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 4003b88d51..9ea269ac2b 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -3968,7 +3968,7 @@ static NTSTATUS rpc_share_migrate_files_internals(struct net_context *c,
cp_clistate.cli_share_src = NULL;
cp_clistate.cli_share_dst = NULL;
cp_clistate.cwd = NULL;
- cp_clistate.attribute = aSYSTEM | aHIDDEN | aDIR;
+ cp_clistate.attribute = aSYSTEM | FILE_ATTRIBUTE_HIDDEN | aDIR;
cp_clistate.c = c;
/* open share source */