diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-04-29 13:23:14 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-04-29 16:38:13 +1000 |
commit | 0a3c84b554f3862b3e558f62e67ceb8311b248ce (patch) | |
tree | acf760282a4bc495c69127ad38e22c06984e752c | |
parent | 317e19aeb3fbdb21573b6ef1bc8c2af646a7e61e (diff) | |
download | samba-0a3c84b554f3862b3e558f62e67ceb8311b248ce.tar.gz samba-0a3c84b554f3862b3e558f62e67ceb8311b248ce.tar.bz2 samba-0a3c84b554f3862b3e558f62e67ceb8311b248ce.zip |
s3-smb Use FILE_ATTRIBUTE_SYSTEM intead of aSYSTEM
This means we use just one constant for this file attribute.
Andrew Bartlett
-rw-r--r-- | source3/client/client.c | 14 | ||||
-rw-r--r-- | source3/client/clitar.c | 6 | ||||
-rw-r--r-- | source3/include/smb.h | 1 | ||||
-rw-r--r-- | source3/include/smb_macros.h | 2 | ||||
-rw-r--r-- | source3/lib/util.c | 2 | ||||
-rw-r--r-- | source3/libgpo/gpo_filesync.c | 2 | ||||
-rw-r--r-- | source3/libsmb/clifile.c | 6 | ||||
-rw-r--r-- | source3/libsmb/libsmb_dir.c | 10 | ||||
-rw-r--r-- | source3/smbd/dir.c | 6 | ||||
-rw-r--r-- | source3/smbd/dosmode.c | 14 | ||||
-rw-r--r-- | source3/smbd/nttrans.c | 2 | ||||
-rw-r--r-- | source3/smbd/reply.c | 4 | ||||
-rw-r--r-- | source3/smbd/smb2_find.c | 2 | ||||
-rw-r--r-- | source3/torture/denytest.c | 8 | ||||
-rw-r--r-- | source3/torture/locktest.c | 2 | ||||
-rw-r--r-- | source3/torture/locktest2.c | 2 | ||||
-rw-r--r-- | source3/torture/mangle_test.c | 10 | ||||
-rw-r--r-- | source3/torture/masktest.c | 4 | ||||
-rw-r--r-- | source3/torture/nbio.c | 2 | ||||
-rw-r--r-- | source3/torture/scanner.c | 4 | ||||
-rw-r--r-- | source3/torture/torture.c | 208 | ||||
-rw-r--r-- | source3/torture/utable.c | 8 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 2 |
23 files changed, 160 insertions, 161 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 7269f206f5..fed5b70bb1 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 | FILE_ATTRIBUTE_HIDDEN; + uint16 attribute = aDIR | FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN; + uint16 attribute = aDIR | FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN | aDIR,do_mget,false, true); + status = do_list(mget_mask, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN; + uint16 attribute = FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + status = cli_unlink(cli_state, mask, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN; + uint16 attribute = FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN, + status = cli_list(targetcli, targetpath, aDIR | FILE_ATTRIBUTE_SYSTEM | 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 eba9915e2a..c389cfa776 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 | FILE_ATTRIBUTE_HIDDEN; +static uint16 attribute = aDIR | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN; #ifndef CLIENT_TIMEOUT #define CLIENT_TIMEOUT (30*1000) @@ -689,7 +689,7 @@ static NTSTATUS do_atar(const char *rname_in, char *lname, if (tar_inc && !(finfo.mode & aARCH)) { DEBUG(4, ("skipping %s - archive bit not set\n", finfo.name)); shallitime=0; - } else if (!tar_system && (finfo.mode & aSYSTEM)) { + } else if (!tar_system && (finfo.mode & FILE_ATTRIBUTE_SYSTEM)) { DEBUG(4, ("skipping %s - system bit is set\n", finfo.name)); shallitime=0; } else if (!tar_hidden && (finfo.mode & FILE_ATTRIBUTE_HIDDEN)) { @@ -1411,7 +1411,7 @@ int cmd_setmode(void) attra[direct]|=FILE_ATTRIBUTE_HIDDEN; break; case 's': - attra[direct]|=aSYSTEM; + attra[direct]|=FILE_ATTRIBUTE_SYSTEM; break; case 'a': attra[direct]|=aARCH; diff --git a/source3/include/smb.h b/source3/include/smb.h index 148b444086..d65ec379fe 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 aSYSTEM (1L<<2) /* 0x04 */ #define aVOLID (1L<<3) /* 0x08 */ #define aDIR (1L<<4) /* 0x10 */ #define aARCH (1L<<5) /* 0x20 */ diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index c949125782..a60ccedeef 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -31,7 +31,7 @@ #define IS_DOS_READONLY(test_mode) (((test_mode) & FILE_ATTRIBUTE_READONLY) != 0) #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_SYSTEM(test_mode) (((test_mode) & FILE_ATTRIBUTE_SYSTEM) != 0) #define IS_DOS_HIDDEN(test_mode) (((test_mode) & FILE_ATTRIBUTE_HIDDEN) != 0) #define SMB_WARN(condition, message) \ diff --git a/source3/lib/util.c b/source3/lib/util.c index 5a191ca24e..1cd0059dd7 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -308,7 +308,7 @@ char *attrib_string(uint16 mode) if (mode & aDIR) fstrcat(attrstr,"D"); if (mode & aARCH) fstrcat(attrstr,"A"); if (mode & FILE_ATTRIBUTE_HIDDEN) fstrcat(attrstr,"H"); - if (mode & aSYSTEM) fstrcat(attrstr,"S"); + if (mode & FILE_ATTRIBUTE_SYSTEM) fstrcat(attrstr,"S"); if (mode & FILE_ATTRIBUTE_READONLY) fstrcat(attrstr,"R"); return talloc_strdup(talloc_tos(), attrstr); diff --git a/source3/libgpo/gpo_filesync.c b/source3/libgpo/gpo_filesync.c index b4a976840e..c88b12c20e 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 | FILE_ATTRIBUTE_HIDDEN | aDIR); + ctx.attribute = (FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN | aDIR); ctx.mask = talloc_asprintf(mem_ctx, "%s\\*", diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 2c34358011..13ffeaa72f 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 | FILE_ATTRIBUTE_HIDDEN | aDIR); + SSVAL(state->vwv+0, 0, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN | aDIR); + SSVAL(state->vwv+0, 0 ,FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + SSVAL(state->vwv + 4, 0, FILE_ATTRIBUTE_SYSTEM | 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 abca6bccdb..9b0f10f52d 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 | FILE_ATTRIBUTE_HIDDEN, + aDIR | FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN, + aDIR | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN, rmdir_list_fn, &smbc_rmdir_dirempty); @@ -1613,7 +1613,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_IXGRP) && lp_map_system(-1)) mode |= FILE_ATTRIBUTE_SYSTEM; if ((newmode & S_IXOTH) && lp_map_hidden(-1)) mode |= FILE_ATTRIBUTE_HIDDEN; if (!NT_STATUS_IS_OK(cli_setatr(targetcli, targetpath, mode, 0))) { @@ -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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(targetcli, targetpath, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN)) || + !NT_STATUS_IS_OK(cli_unlink(targetcli1, targetpath2, FILE_ATTRIBUTE_SYSTEM | 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 81391d0daa..56104ee8ca 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) & (FILE_ATTRIBUTE_HIDDEN | aSYSTEM | aDIR)) != 0) + if (((mode & ~dirtype) & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM | 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|FILE_ATTRIBUTE_HIDDEN|aSYSTEM)); /* & 0x37 */ + mask = ((dirtype >> 8) & (aDIR|aARCH|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM)); /* & 0x37 */ if(mask) { - if((mask & (mode & (aDIR|aARCH|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_HIDDEN|aSYSTEM))) == mask) /* check if matching attribute present */ + if((mask & (mode & (aDIR|aARCH|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM))) == mask) /* check if matching attribute present */ return True; else return False; diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 8932870989..a92ed1c8c9 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -186,7 +186,7 @@ static uint32 dos_mode_from_sbuf(connection_struct *conn, result |= aARCH; if (MAP_SYSTEM(conn) && ((smb_fname->st.st_ex_mode & S_IXGRP) != 0)) - result |= aSYSTEM; + result |= FILE_ATTRIBUTE_SYSTEM; if (MAP_HIDDEN(conn) && ((smb_fname->st.st_ex_mode & S_IXOTH) != 0)) result |= FILE_ATTRIBUTE_HIDDEN; @@ -200,7 +200,7 @@ static uint32 dos_mode_from_sbuf(connection_struct *conn, if (result & FILE_ATTRIBUTE_HIDDEN) DEBUG(8, ("h")); if (result & FILE_ATTRIBUTE_READONLY ) DEBUG(8, ("r")); - if (result & aSYSTEM) DEBUG(8, ("s")); + if (result & FILE_ATTRIBUTE_SYSTEM) DEBUG(8, ("s")); if (result & aDIR ) DEBUG(8, ("d")); if (result & aARCH ) DEBUG(8, ("a")); @@ -327,7 +327,7 @@ static bool get_ea_dos_attribute(connection_struct *conn, if (dosattr & FILE_ATTRIBUTE_HIDDEN) DEBUG(8, ("h")); if (dosattr & FILE_ATTRIBUTE_READONLY ) DEBUG(8, ("r")); - if (dosattr & aSYSTEM) DEBUG(8, ("s")); + if (dosattr & FILE_ATTRIBUTE_SYSTEM) DEBUG(8, ("s")); if (dosattr & aDIR ) DEBUG(8, ("d")); if (dosattr & aARCH ) DEBUG(8, ("a")); @@ -488,7 +488,7 @@ uint32 dos_mode_msdfs(connection_struct *conn, if (result & FILE_ATTRIBUTE_HIDDEN) DEBUG(8, ("h")); if (result & FILE_ATTRIBUTE_READONLY ) DEBUG(8, ("r")); - if (result & aSYSTEM) DEBUG(8, ("s")); + if (result & FILE_ATTRIBUTE_SYSTEM) DEBUG(8, ("s")); if (result & aDIR ) DEBUG(8, ("d")); if (result & aARCH ) DEBUG(8, ("a")); if (result & FILE_ATTRIBUTE_SPARSE ) DEBUG(8, ("[sparse]")); @@ -513,7 +513,7 @@ int dos_attributes_to_stat_dos_flags(uint32_t dosmode) dos_stat_flags |= UF_DOS_HIDDEN; if (dosmode & FILE_ATTRIBUTE_READONLY) dos_stat_flags |= UF_DOS_RO; - if (dosmode & aSYSTEM) + if (dosmode & FILE_ATTRIBUTE_SYSTEM) dos_stat_flags |= UF_DOS_SYSTEM; if (dosmode & FILE_ATTRIBUTE_NONINDEXED) dos_stat_flags |= UF_DOS_NOINDEX; @@ -546,7 +546,7 @@ static bool get_stat_dos_flags(connection_struct *conn, if (smb_fname->st.st_ex_flags & UF_DOS_RO) *dosmode |= FILE_ATTRIBUTE_READONLY; if (smb_fname->st.st_ex_flags & UF_DOS_SYSTEM) - *dosmode |= aSYSTEM; + *dosmode |= FILE_ATTRIBUTE_SYSTEM; if (smb_fname->st.st_ex_flags & UF_DOS_NOINDEX) *dosmode |= FILE_ATTRIBUTE_NONINDEXED; if (smb_fname->st.st_ex_flags & FILE_ATTRIBUTE_SPARSE) @@ -673,7 +673,7 @@ uint32 dos_mode(connection_struct *conn, struct smb_filename *smb_fname) if (result & FILE_ATTRIBUTE_HIDDEN) DEBUG(8, ("h")); if (result & FILE_ATTRIBUTE_READONLY ) DEBUG(8, ("r")); - if (result & aSYSTEM) DEBUG(8, ("s")); + if (result & FILE_ATTRIBUTE_SYSTEM) DEBUG(8, ("s")); if (result & aDIR ) DEBUG(8, ("d")); if (result & aARCH ) DEBUG(8, ("a")); if (result & FILE_ATTRIBUTE_SPARSE ) DEBUG(8, ("[sparse]")); diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 6fdefaad43..858e19aeb3 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) & (FILE_ATTRIBUTE_HIDDEN | aSYSTEM)) { + if ((fattr & ~attrs) & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) { status = NT_STATUS_NO_SUCH_FILE; goto out; } diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 6b6030d294..6c498fd40e 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2388,7 +2388,7 @@ static NTSTATUS can_rename(connection_struct *conn, files_struct *fsp, } fmode = dos_mode(conn, fsp->fsp_name); - if ((fmode & ~dirtype) & (FILE_ATTRIBUTE_HIDDEN | aSYSTEM)) { + if ((fmode & ~dirtype) & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) { 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|FILE_ATTRIBUTE_HIDDEN|aSYSTEM); + dirtype &= (aDIR|aARCH|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM); if (!dirtype) { return NT_STATUS_NO_SUCH_FILE; } diff --git a/source3/smbd/smb2_find.c b/source3/smbd/smb2_find.c index c0873dee1f..8ac0f6e01c 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 = FILE_ATTRIBUTE_HIDDEN | aSYSTEM | aDIR; + uint32_t dirtype = FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM | aDIR; bool dont_descend = false; bool ask_sharemode = true; diff --git a/source3/torture/denytest.c b/source3/torture/denytest.c index e260a6104b..5265d05aaf 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fnames[i], FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fnames[i], FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fnames[i], FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fnames[i], FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); } if (!torture_close_connection(cli1)) { diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c index 13cf7212b9..27e3a13133 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli[server][0], FILENAME, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); } } diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c index 82002c8aed..500df6bb13 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli[server][0], FILENAME, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); } } diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 8b6c405c5b..f76ef7eebf 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(cli, name2, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(cli, name, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN))) { printf("unlink2 of %s (%s) failed (%s)\n", name, name2, cli_errstr(cli)); failures++; - cli_unlink(cli, name2, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, name2, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); return True; } @@ -178,7 +178,7 @@ bool torture_mangle(int dummy) return False; } - cli_unlink(cli, "\\mangle_test\\*", aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, "\\mangle_test\\*", FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, "\\mangle_test\\*", FILE_ATTRIBUTE_SYSTEM | 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 a80fec90f9..a523560fd9 100644 --- a/source3/torture/masktest.c +++ b/source3/torture/masktest.c @@ -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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, file, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, "\\masktest\\*", FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); if (argc >= 2) { while (argc >= 2) { diff --git a/source3/torture/nbio.c b/source3/torture/nbio.c index ed1a3aa5f3..96584455e4 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(c, fname, FILE_ATTRIBUTE_SYSTEM | 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 5e06cb5878..66278302fd 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, "\\newfile.dat", FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, "\\newfile.dat", FILE_ATTRIBUTE_SYSTEM | 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 83e2f8a633..4238627a0f 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(c, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(c, lockfname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(c, lockfname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(c1, lockfname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(c1, lockfname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, lockfname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(cli1, lockfname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname[i], FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname[i], FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); - cli_unlink(cli, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname1, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname1, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (NT_STATUS_IS_OK(cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname2, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); - cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); - cli_unlink(cli1, fname_ln, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname_ln, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN))) { printf("unlink failed (%s)\n", cli_errstr(cli1)); correct = false; } - if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname_ln, aSYSTEM | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(cli1, fname_ln, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); - cli_unlink(cli, fname_ln, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname_ln, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); - cli_unlink(cli, fname_ln, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname_ln, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); - cli_unlink(cli1, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname1, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); - cli_unlink(cli1, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname1, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); - cli_unlink(cli1, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname1, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); - cli_unlink(cli1, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname1, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); /*----*/ @@ -4399,8 +4399,8 @@ static bool run_rename(int dummy) return False; } - cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); - cli_unlink(cli1, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname1, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); /*--*/ @@ -4457,8 +4457,8 @@ static bool run_rename(int dummy) } } - cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); - cli_unlink(cli1, fname1, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname1, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); cli_sockopt(cli1, sockops); @@ -4575,7 +4575,7 @@ static bool run_opentest(int dummy) return False; } - cli_unlink(cli1, fname, aSYSTEM | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(cli1, tmp_path, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli2, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) + if (!NT_STATUS_IS_OK(cli_unlink(pcli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, "\\chkpath.dir\\*", FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, "\\chkpath.dir\\*", FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + status = cli_unlink(pcli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN))) { + if (!NT_STATUS_IS_OK(cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, "\\testdir\\*", FILE_ATTRIBUTE_SYSTEM | 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 ed1c4b80de..075343a02e 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, "\\utable\\*", FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, "\\utable\\*", FILE_ATTRIBUTE_SYSTEM | 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 | FILE_ATTRIBUTE_HIDDEN); + cli_unlink(cli, "\\utable\\*", FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); cli_rmdir(cli, "\\utable"); return True; diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 9ea269ac2b..6f9ef8c107 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 | FILE_ATTRIBUTE_HIDDEN | aDIR; + cp_clistate.attribute = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN | aDIR; cp_clistate.c = c; /* open share source */ |