diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-12-02 04:37:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:06:16 -0500 |
commit | cc8f4358cca2404895015e2351394f2f4a16e025 (patch) | |
tree | 1da58580fff856f4f14c577c910e0ea5cb4af817 | |
parent | 81476cd9fad32f5629de44d45c3a9c58d67e5864 (diff) | |
download | samba-cc8f4358cca2404895015e2351394f2f4a16e025.tar.gz samba-cc8f4358cca2404895015e2351394f2f4a16e025.tar.bz2 samba-cc8f4358cca2404895015e2351394f2f4a16e025.zip |
r4035: more effort on consistent naming of the access mask bits.
This removes the duplicate named SEC_RIGHTS_MAXIMUM_ALLOWED and
SEC_RIGHTS_FULL_CONTROL, which are just other names for
SEC_FLAG_MAXIMUM_ALLOWED and SEC_RIGHTS_FILE_ALL. The latter names
match the new naming conventions in security.idl
Also added names for the generic->specific mappings for files are
directories
(This used to be commit 17a4e0b3aca227b40957ed1e0c57e498debc6ddf)
32 files changed, 116 insertions, 104 deletions
diff --git a/source4/gtk/common/select.c b/source4/gtk/common/select.c index 46a9140831..dac32e8807 100644 --- a/source4/gtk/common/select.c +++ b/source4/gtk/common/select.c @@ -136,7 +136,7 @@ GtkWidget *gtk_select_domain_dialog_new (struct dcerpc_pipe *sam_pipe) d->sam_pipe = sam_pipe; cr.in.system_name = 0; - cr.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + cr.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; cr.out.connect_handle = &handle; status = dcerpc_samr_Connect(sam_pipe, mem_ctx, &cr); diff --git a/source4/gtk/tools/gwsam.c b/source4/gtk/tools/gwsam.c index 2f8e247fff..d4da7a2fdf 100644 --- a/source4/gtk/tools/gwsam.c +++ b/source4/gtk/tools/gwsam.c @@ -144,7 +144,7 @@ static void connect_sam(void) } r.in.system_name = 0; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.connect_handle = &sam_handle; status = dcerpc_samr_Connect(sam_pipe, mem_ctx, &r); diff --git a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c index 47afc31d96..1a7cb38af5 100644 --- a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c +++ b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c @@ -47,7 +47,7 @@ static void init_winreg_String(struct winreg_String *name, const char *s) unknown.unknown0 = 0x84e0; \ unknown.unknown1 = 0x0000; \ r.in.unknown = &unknown; \ - r.in.access_required = SEC_RIGHTS_MAXIMUM_ALLOWED; \ + r.in.access_required = SEC_FLAG_MAXIMUM_ALLOWED; \ r.out.handle = hnd;\ \ status = dcerpc_winreg_Open ## u(p, mem_ctx, &r); \ diff --git a/source4/libnet/libnet_passwd.c b/source4/libnet/libnet_passwd.c index 60d538369b..9b0d41f950 100644 --- a/source4/libnet/libnet_passwd.c +++ b/source4/libnet/libnet_passwd.c @@ -340,7 +340,7 @@ static NTSTATUS libnet_SetPassword_samr(struct libnet_context *ctx, TALLOC_CTX * /* prepare samr_Connect */ ZERO_STRUCT(p_handle); sc.in.system_name = NULL; - sc.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + sc.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; sc.out.connect_handle = &p_handle; /* 2. do a samr_Connect to get a policy handle */ @@ -387,7 +387,7 @@ static NTSTATUS libnet_SetPassword_samr(struct libnet_context *ctx, TALLOC_CTX * /* prepare samr_OpenDomain */ ZERO_STRUCT(d_handle); od.in.connect_handle = &p_handle; - od.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + od.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; od.in.sid = ld.out.sid; od.out.domain_handle = &d_handle; @@ -449,7 +449,7 @@ static NTSTATUS libnet_SetPassword_samr(struct libnet_context *ctx, TALLOC_CTX * /* prepare samr_OpenUser */ ZERO_STRUCT(u_handle); ou.in.domain_handle = &d_handle; - ou.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + ou.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; ou.in.rid = ln.out.rids.ids[0]; ou.out.user_handle = &u_handle; diff --git a/source4/librpc/idl/security.idl b/source4/librpc/idl/security.idl index 817b57a780..1ef1783073 100644 --- a/source4/librpc/idl/security.idl +++ b/source4/librpc/idl/security.idl @@ -71,24 +71,36 @@ interface security const int SEC_REG_NOTIFY = 0x00000010; const int SEC_REG_CREATE_LINK = 0x00000020; - /* common combinations of bits */ - const int SEC_RIGHTS_FULL_CONTROL = SEC_STD_ALL | SEC_FILE_ALL; - - const int SEC_RIGHTS_FILE_READ = SEC_STD_READ_CONTROL | - SEC_STD_SYNCHRONIZE | - SEC_FILE_READ_DATA | - SEC_FILE_READ_ATTRIBUTE | - SEC_FILE_READ_EA; - - const int SEC_RIGHTS_FILE_WRITE = SEC_STD_READ_CONTROL | - SEC_STD_SYNCHRONIZE | - SEC_FILE_WRITE_DATA | - SEC_FILE_WRITE_ATTRIBUTE | - SEC_FILE_WRITE_EA | - SEC_FILE_APPEND_DATA; - - const int SEC_RIGHTS_MAXIMUM_ALLOWED = SEC_FLAG_MAXIMUM_ALLOWED; - + /* generic->specific mappings for files */ + const int SEC_RIGHTS_FILE_READ = SEC_STD_READ_CONTROL | + SEC_STD_SYNCHRONIZE | + SEC_FILE_READ_DATA | + SEC_FILE_READ_ATTRIBUTE | + SEC_FILE_READ_EA; + + const int SEC_RIGHTS_FILE_WRITE = SEC_STD_READ_CONTROL | + SEC_STD_SYNCHRONIZE | + SEC_FILE_WRITE_DATA | + SEC_FILE_WRITE_ATTRIBUTE | + SEC_FILE_WRITE_EA | + SEC_FILE_APPEND_DATA; + + const int SEC_RIGHTS_FILE_EXECUTE = SEC_STD_SYNCHRONIZE | + SEC_STD_READ_CONTROL | + SEC_FILE_READ_ATTRIBUTE | + SEC_FILE_EXECUTE; + + const int SEC_RIGHTS_FILE_ALL = SEC_STD_ALL | SEC_FILE_ALL; + + /* generic->specific mappings for directories (same as files) */ + const int SEC_RIGHTS_DIR_READ = SEC_RIGHTS_FILE_READ; + const int SEC_RIGHTS_DIR_WRITE = SEC_RIGHTS_FILE_WRITE; + const int SEC_RIGHTS_DIR_EXECUTE = SEC_RIGHTS_FILE_EXECUTE; + const int SEC_RIGHTS_DIR_ALL = SEC_RIGHTS_FILE_ALL; + + + /***************************************************************/ + /* WELL KNOWN SIDS */ /* a NULL sid */ const string SID_NULL = "S-1-0-0"; diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index 236bc4d98d..c584ddc4e8 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -71,7 +71,7 @@ static NTSTATUS pvfs_default_acl(struct pvfs_state *pvfs, - Group - Everyone */ - access_masks[0] = SEC_RIGHTS_FULL_CONTROL; + access_masks[0] = SEC_RIGHTS_FILE_ALL; access_masks[1] = 0; access_masks[2] = 0; access_masks[3] = 0; diff --git a/source4/torture/basic/charset.c b/source4/torture/basic/charset.c index 1024c1cd26..5154da8563 100644 --- a/source4/torture/basic/charset.c +++ b/source4/torture/basic/charset.c @@ -68,7 +68,7 @@ static NTSTATUS unicode_open(struct smbcli_tree *tree, io.generic.level = RAW_OPEN_NTCREATEX; io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED; io.ntcreatex.in.root_fid = 0; - io.ntcreatex.in.access_mask = SEC_RIGHTS_FULL_CONTROL; + io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL; io.ntcreatex.in.alloc_size = 0; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_NONE; diff --git a/source4/torture/basic/delete.c b/source4/torture/basic/delete.c index 99be602de9..3247a7cd28 100644 --- a/source4/torture/basic/delete.c +++ b/source4/torture/basic/delete.c @@ -49,7 +49,7 @@ BOOL torture_test_delete(void) smbcli_unlink(cli1->tree, fname); fnum1 = smbcli_nt_create_full(cli1->tree, fname, 0, - SEC_RIGHTS_FULL_CONTROL, + SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_DELETE, NTCREATEX_DISP_OVERWRITE_IF, NTCREATEX_OPTIONS_DELETE_ON_CLOSE, 0); @@ -84,7 +84,7 @@ BOOL torture_test_delete(void) smbcli_unlink(cli1->tree, fname); fnum1 = smbcli_nt_create_full(cli1->tree, fname, 0, - SEC_RIGHTS_FULL_CONTROL, + SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_NONE, NTCREATEX_DISP_OVERWRITE_IF, 0, 0); @@ -128,7 +128,7 @@ BOOL torture_test_delete(void) smbcli_unlink(cli1->tree, fname); fnum1 = smbcli_nt_create_full(cli1->tree, fname, 0, - SEC_RIGHTS_FULL_CONTROL, + SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_READ|NTCREATEX_SHARE_ACCESS_WRITE, NTCREATEX_DISP_OVERWRITE_IF, 0, 0); @@ -535,7 +535,7 @@ BOOL torture_test_delete(void) smbcli_unlink(cli1->tree, fname); fnum1 = smbcli_nt_create_full(cli1->tree, fname, 0, - SEC_RIGHTS_FULL_CONTROL, + SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_READONLY, NTCREATEX_SHARE_ACCESS_NONE, NTCREATEX_DISP_OVERWRITE_IF, 0, 0); @@ -571,7 +571,7 @@ BOOL torture_test_delete(void) /* test 12 - does having read only attribute still allow delete on close at time of open. */ fnum1 = smbcli_nt_create_full(cli1->tree, fname, 0, - SEC_RIGHTS_FULL_CONTROL, + SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_READONLY, NTCREATEX_SHARE_ACCESS_DELETE, NTCREATEX_DISP_OVERWRITE_IF, NTCREATEX_OPTIONS_DELETE_ON_CLOSE, 0); diff --git a/source4/torture/basic/dir.c b/source4/torture/basic/dir.c index 1394ef5b5b..d7721ce5ae 100644 --- a/source4/torture/basic/dir.c +++ b/source4/torture/basic/dir.c @@ -111,7 +111,7 @@ BOOL torture_dirtest2(void) char *fname; asprintf(&fname, "\\LISTDIR\\f%d", i); fnum = smbcli_nt_create_full(cli->tree, fname, 0, - SEC_RIGHTS_FULL_CONTROL, + SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_ARCHIVE, NTCREATEX_SHARE_ACCESS_READ|NTCREATEX_SHARE_ACCESS_WRITE, NTCREATEX_DISP_OVERWRITE_IF, 0, 0); diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c index 08a870334d..4a92b5f31a 100644 --- a/source4/torture/basic/scanner.c +++ b/source4/torture/basic/scanner.c @@ -267,7 +267,7 @@ BOOL torture_trans2_scan(void) } qfnum = smbcli_nt_create_full(cli->tree, "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION", NTCREATEX_FLAGS_EXTENDED, - SEC_RIGHTS_MAXIMUM_ALLOWED, + SEC_FLAG_MAXIMUM_ALLOWED, 0, NTCREATEX_SHARE_ACCESS_READ|NTCREATEX_SHARE_ACCESS_WRITE, NTCREATEX_DISP_OPEN, diff --git a/source4/torture/basic/unlink.c b/source4/torture/basic/unlink.c index 3fe0ea8f28..75d1549fcf 100644 --- a/source4/torture/basic/unlink.c +++ b/source4/torture/basic/unlink.c @@ -82,7 +82,7 @@ BOOL torture_unlinktest(void) io.ntcreatex.in.security_flags = 0; io.ntcreatex.in.fname = fname; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_DELETE; - io.ntcreatex.in.access_mask = SEC_RIGHTS_FULL_CONTROL; + io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL; status = smb_raw_open(cli->tree, cli, &io); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/torture/basic/utable.c b/source4/torture/basic/utable.c index dcd00b9fbb..f9233595cf 100644 --- a/source4/torture/basic/utable.c +++ b/source4/torture/basic/utable.c @@ -151,7 +151,7 @@ BOOL torture_casetable(void) #if 0 SEC_RIGHT_MAXIMUM_ALLOWED, #else - SEC_RIGHTS_FULL_CONTROL, + SEC_RIGHTS_FILE_ALL, #endif FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_NONE, diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c index 35b835b37f..e49267e162 100644 --- a/source4/torture/gentest.c +++ b/source4/torture/gentest.c @@ -527,7 +527,7 @@ static uint32_t gen_ntcreatex_flags(void) */ static uint32_t gen_access_mask(void) { - if (gen_chance(50)) return SEC_RIGHTS_MAXIMUM_ALLOWED; + if (gen_chance(50)) return SEC_FLAG_MAXIMUM_ALLOWED; if (gen_chance(20)) return SEC_FILE_ALL; return gen_bits_mask(0xFFFFFFFF); } diff --git a/source4/torture/raw/chkpath.c b/source4/torture/raw/chkpath.c index 6379c3ce8d..a59fa1af9b 100644 --- a/source4/torture/raw/chkpath.c +++ b/source4/torture/raw/chkpath.c @@ -128,7 +128,7 @@ static BOOL test_chkpath(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) printf("testing Open on %s\n", "\\.\\\\\\\\\\\\."); /* findfirst seems to fail with a different error. */ fnum1 = smbcli_nt_create_full(cli->tree, "\\.\\\\\\\\\\\\.", - 0, SEC_RIGHTS_FULL_CONTROL, + 0, SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_DELETE| NTCREATEX_SHARE_ACCESS_READ| @@ -169,7 +169,7 @@ static BOOL test_chkpath(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) printf("testing Open on %s\n", BASEDIR".\\.\\.\\.\\foo\\..\\.\\"); /* findfirst seems to fail with a different error. */ fnum1 = smbcli_nt_create_full(cli->tree, BASEDIR".\\.\\.\\.\\foo\\..\\.\\", - 0, SEC_RIGHTS_FULL_CONTROL, + 0, SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_DELETE| NTCREATEX_SHARE_ACCESS_READ| @@ -187,7 +187,7 @@ static BOOL test_chkpath(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) /* findfirst seems to fail with a different error. */ printf("testing Open on %s\n", BASEDIR "\\nt\\V S\\VB98\\vb6.exe\\3"); fnum1 = smbcli_nt_create_full(cli->tree, BASEDIR "\\nt\\V S\\VB98\\vb6.exe\\3", - 0, SEC_RIGHTS_FULL_CONTROL, + 0, SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_DELETE| NTCREATEX_SHARE_ACCESS_READ| diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c index 581705c1e4..7fb49c3376 100644 --- a/source4/torture/raw/context.c +++ b/source4/torture/raw/context.c @@ -140,7 +140,7 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) io.generic.level = RAW_OPEN_NTCREATEX; io.ntcreatex.in.root_fid = 0; io.ntcreatex.in.flags = 0; - io.ntcreatex.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; io.ntcreatex.in.create_options = 0; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE; @@ -242,7 +242,7 @@ static BOOL test_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) io.generic.level = RAW_OPEN_NTCREATEX; io.ntcreatex.in.root_fid = 0; io.ntcreatex.in.flags = 0; - io.ntcreatex.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; io.ntcreatex.in.create_options = 0; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE; @@ -327,7 +327,7 @@ static BOOL test_pid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) io.generic.level = RAW_OPEN_NTCREATEX; io.ntcreatex.in.root_fid = 0; io.ntcreatex.in.flags = 0; - io.ntcreatex.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; io.ntcreatex.in.create_options = 0; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE; diff --git a/source4/torture/raw/eas.c b/source4/torture/raw/eas.c index 949643872d..13ebea2401 100644 --- a/source4/torture/raw/eas.c +++ b/source4/torture/raw/eas.c @@ -106,7 +106,7 @@ static BOOL test_eas(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) io.generic.level = RAW_OPEN_NTCREATEX; io.ntcreatex.in.root_fid = 0; io.ntcreatex.in.flags = 0; - io.ntcreatex.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; io.ntcreatex.in.create_options = 0; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; io.ntcreatex.in.share_access = @@ -207,7 +207,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) io.generic.level = RAW_OPEN_NTTRANS_CREATE; io.ntcreatex.in.root_fid = 0; io.ntcreatex.in.flags = 0; - io.ntcreatex.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; io.ntcreatex.in.create_options = 0; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; io.ntcreatex.in.share_access = diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c index 9d8e360f00..fb50ec6c4f 100644 --- a/source4/torture/raw/open.c +++ b/source4/torture/raw/open.c @@ -621,7 +621,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) io.generic.level = RAW_OPEN_NTCREATEX; io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED; io.ntcreatex.in.root_fid = 0; - io.ntcreatex.in.access_mask = SEC_RIGHTS_FULL_CONTROL; + io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL; io.ntcreatex.in.alloc_size = 1024*1024; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_NONE; @@ -707,7 +707,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) /* create a directory */ io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE; - io.ntcreatex.in.access_mask = SEC_RIGHTS_FULL_CONTROL; + io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL; io.ntcreatex.in.alloc_size = 0; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_DIRECTORY; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_NONE; @@ -719,7 +719,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) smbcli_rmdir(cli->tree, fname); smbcli_unlink(cli->tree, fname); - io.ntcreatex.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE; @@ -794,7 +794,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) io.generic.level = RAW_OPEN_NTTRANS_CREATE; io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED; io.ntcreatex.in.root_fid = 0; - io.ntcreatex.in.access_mask = SEC_RIGHTS_FULL_CONTROL; + io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL; io.ntcreatex.in.alloc_size = 1024*1024; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_NONE; @@ -882,7 +882,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) /* create a directory */ io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE; - io.ntcreatex.in.access_mask = SEC_RIGHTS_FULL_CONTROL; + io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL; io.ntcreatex.in.alloc_size = 0; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_DIRECTORY; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_NONE; @@ -894,7 +894,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) smbcli_rmdir(cli->tree, fname); smbcli_unlink(cli->tree, fname); - io.ntcreatex.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE; diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c index 78236246f4..9dcf6341c0 100644 --- a/source4/torture/raw/oplock.c +++ b/source4/torture/raw/oplock.c @@ -108,7 +108,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) */ io.generic.level = RAW_OPEN_NTCREATEX; io.ntcreatex.in.root_fid = 0; - io.ntcreatex.in.access_mask = SEC_RIGHTS_FULL_CONTROL; + io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL; io.ntcreatex.in.alloc_size = 0; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_NONE; @@ -308,7 +308,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED | NTCREATEX_FLAGS_REQUEST_OPLOCK | NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK; - io.ntcreatex.in.access_mask = SEC_RIGHTS_FULL_CONTROL; + io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL; io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN; status = smb_raw_open(cli->tree, mem_ctx, &io); CHECK_STATUS(status, NT_STATUS_OK); diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c index 23e9cad246..d398026a18 100644 --- a/source4/torture/raw/qfileinfo.c +++ b/source4/torture/raw/qfileinfo.c @@ -556,7 +556,7 @@ BOOL torture_raw_qfileinfo(void) /* and make sure we can open by alternate name */ smbcli_close(cli->tree, fnum); fnum = smbcli_nt_create_full(cli->tree, correct_name, 0, - SEC_RIGHTS_FULL_CONTROL, + SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_DELETE| NTCREATEX_SHARE_ACCESS_READ| diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c index 04071c2f80..6b16612698 100644 --- a/source4/torture/raw/rename.c +++ b/source4/torture/raw/rename.c @@ -62,7 +62,7 @@ static BOOL test_mv(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) op.generic.level = RAW_OPEN_NTCREATEX; op.ntcreatex.in.root_fid = 0; op.ntcreatex.in.flags = 0; - op.ntcreatex.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + op.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; op.ntcreatex.in.create_options = 0; op.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; op.ntcreatex.in.share_access = diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c index 3956e7d4c2..83ba08ee0a 100644 --- a/source4/torture/raw/streams.c +++ b/source4/torture/raw/streams.c @@ -188,7 +188,7 @@ static BOOL test_stream_io(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) io.ntcreatex.in.fname = sname2; io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DELETE_ON_CLOSE; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_DELETE; - io.ntcreatex.in.access_mask = SEC_RIGHTS_FULL_CONTROL; + io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL; io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN; status = smb_raw_open(cli->tree, mem_ctx, &io); CHECK_STATUS(status, NT_STATUS_OK); diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c index 49d0a5bcb8..0df88d2bf6 100644 --- a/source4/torture/rpc/autoidl.c +++ b/source4/torture/rpc/autoidl.c @@ -57,7 +57,7 @@ static BOOL get_policy_handle(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct samr_Connect r; r.in.system_name = 0; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.connect_handle = handle; status = dcerpc_samr_Connect(p, mem_ctx, &r); diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 395ce7ab26..83fb02f9d3 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -52,7 +52,7 @@ static BOOL test_OpenPolicy(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) r.in.system_name = &system_name; r.in.attr = &attr; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.handle = &handle; status = dcerpc_lsa_OpenPolicy(p, mem_ctx, &r); @@ -89,7 +89,7 @@ static BOOL test_OpenPolicy2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r.in.system_name = "\\"; r.in.attr = &attr; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.handle = handle; status = dcerpc_lsa_OpenPolicy2(p, mem_ctx, &r); @@ -403,7 +403,7 @@ static BOOL test_CreateAccount(struct dcerpc_pipe *p, r.in.handle = handle; r.in.sid = newsid; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.acct_handle = &acct_handle; status = dcerpc_lsa_CreateAccount(p, mem_ctx, &r); @@ -439,7 +439,7 @@ static BOOL test_CreateTrustedDomain(struct dcerpc_pipe *p, r.in.handle = handle; r.in.info = &trustinfo; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.dom_handle = &dom_handle; status = dcerpc_lsa_CreateTrustedDomain(p, mem_ctx, &r); @@ -484,7 +484,7 @@ static BOOL test_CreateSecret(struct dcerpc_pipe *p, init_lsa_String(&r.in.name, secname); r.in.handle = handle; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.sec_handle = &sec_handle; status = dcerpc_lsa_CreateSecret(p, mem_ctx, &r); @@ -494,7 +494,7 @@ static BOOL test_CreateSecret(struct dcerpc_pipe *p, } r2.in.handle = handle; - r2.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r2.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r2.in.name = r.in.name; r2.out.sec_handle = &sec_handle2; @@ -643,7 +643,7 @@ static BOOL test_OpenAccount(struct dcerpc_pipe *p, r.in.handle = handle; r.in.sid = sid; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.acct_handle = &acct_handle; status = dcerpc_lsa_OpenAccount(p, mem_ctx, &r); @@ -870,7 +870,7 @@ static BOOL test_EnumTrustDom(struct dcerpc_pipe *p, trust.in.handle = handle; trust.in.sid = domains.domains[i].sid; - trust.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + trust.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; trust.out.trustdom_handle = &trustdom_handle; status = dcerpc_lsa_OpenTrustedDomain(p, mem_ctx, &trust); @@ -905,7 +905,7 @@ static BOOL test_EnumTrustDom(struct dcerpc_pipe *p, trust_by_name.in.handle = handle; trust_by_name.in.name = domains.domains[i].name; - trust_by_name.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + trust_by_name.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; trust_by_name.out.trustdom_handle = &trustdom_handle; status = dcerpc_lsa_OpenTrustedDomainByName(p, mem_ctx, &trust_by_name); diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 29ae5b9273..0fa1bccace 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -796,7 +796,7 @@ static NTSTATUS test_OpenUser_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } r.in.domain_handle = domain_handle; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.in.rid = rid; r.out.user_handle = user_handle; status = dcerpc_samr_OpenUser(p, mem_ctx, &r); @@ -1373,7 +1373,7 @@ static BOOL test_DeleteGroup_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } r.in.domain_handle = handle; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.in.rid = rid; r.out.group_handle = &group_handle; status = dcerpc_samr_OpenGroup(p, mem_ctx, &r); @@ -1413,7 +1413,7 @@ static BOOL test_DeleteAlias_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } r.in.domain_handle = domain_handle; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.in.rid = rid; r.out.alias_handle = &alias_handle; status = dcerpc_samr_OpenAlias(p, mem_ctx, &r); @@ -1469,7 +1469,7 @@ static BOOL test_CreateAlias(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, init_samr_String(&name, TEST_ALIASNAME); r.in.domain_handle = domain_handle; r.in.aliasname = &name; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.alias_handle = alias_handle; r.out.rid = &rid; @@ -1561,7 +1561,7 @@ static BOOL test_CreateUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r.in.domain_handle = domain_handle; r.in.account_name = &name; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.user_handle = user_handle; r.out.rid = &rid; @@ -1710,7 +1710,7 @@ static BOOL test_CreateUser2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r.in.domain_handle = handle; r.in.account_name = &name; r.in.acct_flags = acct_flags; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.user_handle = &user_handle; r.out.access_granted = &access_granted; r.out.rid = &rid; @@ -1977,7 +1977,7 @@ static BOOL test_OpenUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("Testing OpenUser(%u)\n", rid); r.in.domain_handle = handle; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.in.rid = rid; r.out.user_handle = &user_handle; @@ -2025,7 +2025,7 @@ static BOOL test_OpenGroup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("Testing OpenGroup(%u)\n", rid); r.in.domain_handle = handle; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.in.rid = rid; r.out.group_handle = &group_handle; @@ -2065,7 +2065,7 @@ static BOOL test_OpenAlias(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("Testing OpenAlias(%u)\n", rid); r.in.domain_handle = handle; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.in.rid = rid; r.out.alias_handle = &alias_handle; @@ -2810,7 +2810,7 @@ static BOOL test_CreateDomainGroup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r.in.domain_handle = domain_handle; r.in.name = &name; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.group_handle = group_handle; r.out.rid = &rid; @@ -2894,7 +2894,7 @@ static BOOL test_OpenDomain(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("Testing OpenDomain\n"); r.in.connect_handle = handle; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.in.sid = sid; r.out.domain_handle = &domain_handle; @@ -3060,7 +3060,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("testing samr_Connect\n"); r.in.system_name = 0; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.connect_handle = &h; status = dcerpc_samr_Connect(p, mem_ctx, &r); @@ -3075,7 +3075,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("testing samr_Connect2\n"); r2.in.system_name = NULL; - r2.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r2.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r2.out.connect_handle = &h; status = dcerpc_samr_Connect2(p, mem_ctx, &r2); @@ -3094,7 +3094,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r3.in.system_name = NULL; r3.in.unknown = 0; - r3.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r3.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r3.out.connect_handle = &h; status = dcerpc_samr_Connect3(p, mem_ctx, &r3); @@ -3113,7 +3113,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r4.in.system_name = ""; r4.in.unknown = 0; - r4.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r4.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r4.out.connect_handle = &h; status = dcerpc_samr_Connect4(p, mem_ctx, &r4); @@ -3134,7 +3134,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, info.info1.unknown2 = 0; r5.in.system_name = ""; - r5.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r5.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r5.in.level = 1; r5.in.info = &info; r5.out.info = &info; diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c index 42ac6fc1dc..e85fa8db4f 100644 --- a/source4/torture/rpc/samsync.c +++ b/source4/torture/rpc/samsync.c @@ -151,7 +151,7 @@ static struct policy_handle *samsync_open_domain(TALLOC_CTX *mem_ctx, } o.in.connect_handle = samsync_state->connect_handle; - o.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + o.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; o.in.sid = l.out.sid; o.out.domain_handle = domain_handle; @@ -410,7 +410,7 @@ static BOOL samsync_handle_user(TALLOC_CTX *mem_ctx, struct samsync_state *samsy } r.in.domain_handle = samsync_state->domain_handle[database_id]; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.in.rid = rid; r.out.user_handle = &user_handle; @@ -612,7 +612,7 @@ static BOOL samsync_handle_alias(TALLOC_CTX *mem_ctx, struct samsync_state *sams } r.in.domain_handle = samsync_state->domain_handle[database_id]; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.in.rid = rid; r.out.alias_handle = &alias_handle; @@ -661,7 +661,7 @@ static BOOL samsync_handle_group(TALLOC_CTX *mem_ctx, struct samsync_state *sams } r.in.domain_handle = samsync_state->domain_handle[database_id]; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.in.rid = rid; r.out.group_handle = &group_handle; @@ -720,7 +720,7 @@ static BOOL samsync_handle_secret(TALLOC_CTX *mem_ctx, struct samsync_state *sam DLIST_ADD(samsync_state->secrets, new); o.in.handle = samsync_state->lsa_handle; - o.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + o.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; o.in.name.string = name; o.out.sec_handle = &sec_handle; @@ -805,7 +805,7 @@ static BOOL samsync_handle_trusted_domain(TALLOC_CTX *mem_ctx, struct samsync_st new->sid = talloc_reference(new, dom_sid); t.in.handle = samsync_state->lsa_handle; - t.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + t.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; t.in.sid = dom_sid; t.out.trustdom_handle = &trustdom_handle; @@ -862,7 +862,7 @@ static BOOL samsync_handle_account(TALLOC_CTX *mem_ctx, struct samsync_state *sa BOOL *found_priv_in_lsa; a.in.handle = samsync_state->lsa_handle; - a.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + a.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; a.in.sid = dom_sid; a.out.acct_handle = &acct_handle; @@ -1212,7 +1212,7 @@ BOOL torture_rpc_samsync(void) samsync_state->connect_handle = talloc_zero_p(samsync_state, struct policy_handle); samsync_state->lsa_handle = talloc_zero_p(samsync_state, struct policy_handle); c.in.system_name = NULL; - c.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + c.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; c.out.connect_handle = samsync_state->connect_handle; status = dcerpc_samr_Connect(samsync_state->p_samr, mem_ctx, &c); @@ -1276,7 +1276,7 @@ BOOL torture_rpc_samsync(void) r.in.system_name = "\\"; r.in.attr = &attr; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.handle = samsync_state->lsa_handle; status = dcerpc_lsa_OpenPolicy2(samsync_state->p_lsa, mem_ctx, &r); diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 7d1718acaf..bfd03810c2 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -694,7 +694,7 @@ static BOOL test_OpenPrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r.in.server = talloc_asprintf(mem_ctx, "\\\\%s\\%s", dcerpc_server_name(p), name); r.in.printer = NULL; r.in.buffer = &blob; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.handle = &handle; printf("\nTesting OpenPrinter(\\\\%s)\n", r.in.server); diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c index 3c40f06b32..efdf60bd3d 100644 --- a/source4/torture/rpc/svcctl.c +++ b/source4/torture/rpc/svcctl.c @@ -80,7 +80,7 @@ static BOOL test_OpenSCManager(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struc r.in.MachineName = NULL; r.in.DatabaseName = NULL; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.handle = h; status = dcerpc_svcctl_OpenSCManagerW(p, mem_ctx, &r); diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c index 9636b27932..d034446adb 100644 --- a/source4/torture/rpc/testjoin.c +++ b/source4/torture/rpc/testjoin.c @@ -60,7 +60,7 @@ static NTSTATUS DeleteUser_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } r.in.domain_handle = handle; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.in.rid = rid; r.out.user_handle = &user_handle; @@ -125,7 +125,7 @@ struct test_join *torture_join_domain(const char *machine_name, } c.in.system_name = NULL; - c.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + c.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; c.out.connect_handle = &handle; status = dcerpc_samr_Connect(join->p, join, &c); @@ -151,7 +151,7 @@ struct test_join *torture_join_domain(const char *machine_name, } o.in.connect_handle = &handle; - o.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + o.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; o.in.sid = l.out.sid; o.out.domain_handle = &domain_handle; @@ -168,7 +168,7 @@ again: r.in.domain_handle = &domain_handle; r.in.account_name = &name; r.in.acct_flags = acct_flags; - r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.user_handle = &join->user_handle; r.out.access_granted = &access_granted; r.out.rid = &rid; diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c index 379653ddf7..9cb41c032b 100644 --- a/source4/torture/rpc/winreg.c +++ b/source4/torture/rpc/winreg.c @@ -348,7 +348,7 @@ static BOOL test_OpenHKLM(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, unknown.unknown0 = 0x84e0; unknown.unknown1 = 0x0000; r.in.unknown = &unknown; - r.in.access_required = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_required = SEC_FLAG_MAXIMUM_ALLOWED; r.out.handle = handle; status = dcerpc_winreg_OpenHKLM(p, mem_ctx, &r); @@ -379,7 +379,7 @@ static BOOL test_OpenHKU(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, unknown.unknown0 = 0x84e0; unknown.unknown1 = 0x0000; r.in.unknown = &unknown; - r.in.access_required = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_required = SEC_FLAG_MAXIMUM_ALLOWED; r.out.handle = handle; status = dcerpc_winreg_OpenHKU(p, mem_ctx, &r); @@ -405,7 +405,7 @@ static BOOL test_OpenHKCR(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, unknown.unknown0 = 0x84e0; unknown.unknown1 = 0x0000; r.in.unknown = &unknown; - r.in.access_required = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_required = SEC_FLAG_MAXIMUM_ALLOWED; r.out.handle = handle; status = dcerpc_winreg_OpenHKCR(p, mem_ctx, &r); @@ -479,7 +479,7 @@ static BOOL test_OpenHKCU(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, unknown.unknown0 = 0x84e0; unknown.unknown1 = 0x0000; r.in.unknown = &unknown; - r.in.access_required = SEC_RIGHTS_MAXIMUM_ALLOWED; + r.in.access_required = SEC_FLAG_MAXIMUM_ALLOWED; r.out.handle = handle; status = dcerpc_winreg_OpenHKCU(p, mem_ctx, &r); diff --git a/source4/torture/rpc/xplogin.c b/source4/torture/rpc/xplogin.c index bb09b7cf09..8b7ccf115d 100644 --- a/source4/torture/rpc/xplogin.c +++ b/source4/torture/rpc/xplogin.c @@ -639,7 +639,7 @@ static NTSTATUS test_getgroups(struct smbcli_transport *transport, r4.in.system_name = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p)); r4.in.unknown = 0; - r4.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r4.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r4.out.connect_handle = &connect_handle; status = dcerpc_samr_Connect4(p, mem_ctx, &r4); @@ -804,7 +804,7 @@ static NTSTATUS test_getallsids(struct smbcli_transport *transport, r4.in.system_name = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p)); r4.in.unknown = 0; - r4.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; + r4.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r4.out.connect_handle = &connect_handle; status = dcerpc_samr_Connect4(p, mem_ctx, &r4); diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 43f276e0c2..f5b45021c5 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -893,7 +893,7 @@ static BOOL run_deferopen(struct smbcli_state *cli, int dummy) struct timeval tv; tv = timeval_current(); fnum = smbcli_nt_create_full(cli->tree, fname, 0, - SEC_RIGHTS_FULL_CONTROL, + SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_NONE, NTCREATEX_DISP_OPEN_IF, 0, 0); diff --git a/source4/torture/torture_util.c b/source4/torture/torture_util.c index edc00a571f..6370086838 100644 --- a/source4/torture/torture_util.c +++ b/source4/torture/torture_util.c @@ -88,7 +88,7 @@ int create_complex_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const cha smbcli_unlink(cli->tree, fname); fnum = smbcli_nt_create_full(cli->tree, fname, 0, - SEC_RIGHTS_FULL_CONTROL, + SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_DELETE| NTCREATEX_SHARE_ACCESS_READ| |