summaryrefslogtreecommitdiff
path: root/source4/ntvfs/common/opendb.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-30 04:33:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:13 -0500
commitfdc9f417d89fdf9dd6afbc22843d70585e195c9d (patch)
treeca74e9c5b19771d7aecff06df93ebfaa3115c7da /source4/ntvfs/common/opendb.c
parent2ed4ff13d509218785d9941dc17219958ab04223 (diff)
downloadsamba-fdc9f417d89fdf9dd6afbc22843d70585e195c9d.tar.gz
samba-fdc9f417d89fdf9dd6afbc22843d70585e195c9d.tar.bz2
samba-fdc9f417d89fdf9dd6afbc22843d70585e195c9d.zip
r4011: get rid of rpc_secdes.h and replace it with a single sane set of
definitions for security access masks, in security.idl The previous definitions were inconsistently named, and contained many duplicate and misleading entries. I kept finding myself tripping up while using them. (This used to be commit 01c0fa722f80ceeb3f81f01987de95f365a2ed3d)
Diffstat (limited to 'source4/ntvfs/common/opendb.c')
-rw-r--r--source4/ntvfs/common/opendb.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/source4/ntvfs/common/opendb.c b/source4/ntvfs/common/opendb.c
index 99c013fc84..8947a5d255 100644
--- a/source4/ntvfs/common/opendb.c
+++ b/source4/ntvfs/common/opendb.c
@@ -40,6 +40,7 @@
#include "includes.h"
#include "messages.h"
+#include "librpc/gen_ndr/ndr_security.h"
struct odb_context {
struct tdb_wrap *w;
@@ -157,14 +158,18 @@ static BOOL share_conflict(struct odb_entry *e1, struct odb_entry *e2)
/* if either open involves no read.write or delete access then
it can't conflict */
- if (!(e1->access_mask & (SA_RIGHT_FILE_WRITE_APPEND |
- SA_RIGHT_FILE_READ_EXEC |
- STD_RIGHT_DELETE_ACCESS))) {
+ if (!(e1->access_mask & (SEC_FILE_WRITE_DATA |
+ SEC_FILE_APPEND_DATA |
+ SEC_FILE_READ_DATA |
+ SEC_FILE_EXECUTE |
+ SEC_STD_DELETE))) {
return False;
}
- if (!(e2->access_mask & (SA_RIGHT_FILE_WRITE_APPEND |
- SA_RIGHT_FILE_READ_EXEC |
- STD_RIGHT_DELETE_ACCESS))) {
+ if (!(e2->access_mask & (SEC_FILE_WRITE_DATA |
+ SEC_FILE_APPEND_DATA |
+ SEC_FILE_READ_DATA |
+ SEC_FILE_EXECUTE |
+ SEC_STD_DELETE))) {
return False;
}
@@ -176,24 +181,24 @@ static BOOL share_conflict(struct odb_entry *e1, struct odb_entry *e2)
}
CHECK_MASK(e1->access_mask, e2->share_access,
- SA_RIGHT_FILE_WRITE_APPEND,
+ SEC_FILE_WRITE_DATA | SEC_FILE_APPEND_DATA,
NTCREATEX_SHARE_ACCESS_WRITE);
CHECK_MASK(e2->access_mask, e1->share_access,
- SA_RIGHT_FILE_WRITE_APPEND,
+ SEC_FILE_WRITE_DATA | SEC_FILE_APPEND_DATA,
NTCREATEX_SHARE_ACCESS_WRITE);
CHECK_MASK(e1->access_mask, e2->share_access,
- SA_RIGHT_FILE_READ_EXEC,
+ SEC_FILE_READ_DATA | SEC_FILE_EXECUTE,
NTCREATEX_SHARE_ACCESS_READ);
CHECK_MASK(e2->access_mask, e1->share_access,
- SA_RIGHT_FILE_READ_EXEC,
+ SEC_FILE_READ_DATA | SEC_FILE_EXECUTE,
NTCREATEX_SHARE_ACCESS_READ);
CHECK_MASK(e1->access_mask, e2->share_access,
- STD_RIGHT_DELETE_ACCESS,
+ SEC_STD_DELETE,
NTCREATEX_SHARE_ACCESS_DELETE);
CHECK_MASK(e2->access_mask, e1->share_access,
- STD_RIGHT_DELETE_ACCESS,
+ SEC_STD_DELETE,
NTCREATEX_SHARE_ACCESS_DELETE);
/* if a delete is pending then a second open is not allowed */