summaryrefslogtreecommitdiff
path: root/source4/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-18 01:41:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:57 -0500
commit012be92f0a771d8437f783dc8ed14f38c669893c (patch)
tree13a87d0d0fdec7bf691a1767151915831d89f7d8 /source4/include
parentbbf009b46f75f292a625b853b9331b5d5e0da7c2 (diff)
downloadsamba-012be92f0a771d8437f783dc8ed14f38c669893c.tar.gz
samba-012be92f0a771d8437f783dc8ed14f38c669893c.tar.bz2
samba-012be92f0a771d8437f783dc8ed14f38c669893c.zip
r3830: unified the query/set security descriptor code with the rest of the
queryfileinfo/setfileinfo logic, so querying/setting a security descriptor is treated as just another file query/set operation. This will allow NTVFS backends to see the query/set security descriptor operations as RAW_FILEINFO_SEC_DESC and RAW_SFILEINFO_SEC_DESC operations. (This used to be commit f68a6b6b915c37e48c42390c1e74c2d1c2636fa9)
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/includes.h1
-rw-r--r--source4/include/smb_interfaces.h38
2 files changed, 38 insertions, 1 deletions
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 10516f8989..c5842f84da 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -179,7 +179,6 @@ extern int errno;
#include "module.h"
#include "mutex.h"
#include "librpc/ndr/libndr.h"
-#include "librpc/ndr/ndr_sec.h"
#include "librpc/gen_ndr/ndr_misc.h"
#include "librpc/gen_ndr/ndr_dcerpc.h"
#include "librpc/rpc/dcerpc.h"
diff --git a/source4/include/smb_interfaces.h b/source4/include/smb_interfaces.h
index 1f0912a149..c447b39b08 100644
--- a/source4/include/smb_interfaces.h
+++ b/source4/include/smb_interfaces.h
@@ -42,6 +42,20 @@ typedef struct {
} WIRE_STRING;
+/*
+ use the same structure for dom_sid2 as dom_sid. A dom_sid2 is really
+ just a dom sid, but with the sub_auths represented as a conformant
+ array. As with all in-structure conformant arrays, the array length
+ is placed before the start of the structure. That's what gives rise
+ to the extra num_auths elemenent. We don't want the Samba code to
+ have to bother with such esoteric NDR details, so its easier to just
+ define it as a dom_sid and use pidl magic to make it all work. It
+ just means you need to mark a sid as a "dom_sid2" in the IDL when you
+ know it is of the conformant array variety
+*/
+#define dom_sid2 dom_sid
+
+
/*
this header defines the structures and unions used between the SMB
parser and the backends.
@@ -296,6 +310,7 @@ enum smb_fileinfo_level {
RAW_FILEINFO_GENERIC = 0xF000,
RAW_FILEINFO_GETATTR, /* SMBgetatr */
RAW_FILEINFO_GETATTRE, /* SMBgetattrE */
+ RAW_FILEINFO_SEC_DESC, /* NT_TRANSACT_QUERY_SECURITY_DESC */
RAW_FILEINFO_STANDARD = SMB_QFILEINFO_STANDARD,
RAW_FILEINFO_EA_SIZE = SMB_QFILEINFO_EA_SIZE,
RAW_FILEINFO_ALL_EAS = SMB_QFILEINFO_ALL_EAS,
@@ -661,6 +676,18 @@ union smb_fileinfo {
uint32_t reparse_tag;
} out;
} attribute_tag_information;
+
+ /* RAW_FILEINFO_QUERY_SEC_DESC */
+ struct {
+ enum smb_fileinfo_level level;
+ struct {
+ uint16_t fnum;
+ uint32_t secinfo_flags;
+ } in;
+ struct {
+ struct security_descriptor *sd;
+ } out;
+ } query_secdesc;
};
@@ -668,6 +695,7 @@ enum smb_setfileinfo_level {
RAW_SFILEINFO_GENERIC = 0xF000,
RAW_SFILEINFO_SETATTR, /* SMBsetatr */
RAW_SFILEINFO_SETATTRE, /* SMBsetattrE */
+ RAW_SFILEINFO_SEC_DESC, /* NT_TRANSACT_SET_SECURITY_DESC */
RAW_SFILEINFO_STANDARD = SMB_SFILEINFO_STANDARD,
RAW_SFILEINFO_EA_SET = SMB_SFILEINFO_EA_SET,
RAW_SFILEINFO_BASIC_INFO = SMB_SFILEINFO_BASIC_INFO,
@@ -854,6 +882,16 @@ union smb_setfileinfo {
const char *link_dest;
} in;
} unix_link, unix_hlink;
+
+ /* RAW_FILEINFO_SET_SEC_DESC */
+ struct {
+ enum smb_setfileinfo_level level;
+ union setfileinfo_file file;
+ struct {
+ uint32_t secinfo_flags;
+ struct security_descriptor *sd;
+ } in;
+ } set_secdesc;
};