summaryrefslogtreecommitdiffstats
path: root/source/include/vfs.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-08-03 22:38:43 +0000
committerJeremy Allison <jra@samba.org>2000-08-03 22:38:43 +0000
commite28d01b744b3dbd33e0e54af4e7f426fa8c082b8 (patch)
tree72e2d0c8dd338681082c520ec6cdcf84d83190f8 /source/include/vfs.h
parentd6db29be98f717a9038b5ac1ff492c70ce2e92a7 (diff)
downloadsamba-e28d01b744b3dbd33e0e54af4e7f426fa8c082b8.tar.gz
samba-e28d01b744b3dbd33e0e54af4e7f426fa8c082b8.tar.xz
samba-e28d01b744b3dbd33e0e54af4e7f426fa8c082b8.zip
Added an NT_USER_TOKEN structure that is copied/passed around associated
with the current user. This will allow se_access_check() to quickly do a SD check without having to translate uid/gid's to SIDs. Still needs work on pipe calls. Jeremy.
Diffstat (limited to 'source/include/vfs.h')
-rw-r--r--source/include/vfs.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/source/include/vfs.h b/source/include/vfs.h
index 1b4e57f2ac1..1312935e7f1 100644
--- a/source/include/vfs.h
+++ b/source/include/vfs.h
@@ -64,6 +64,54 @@ typedef char fstring[FSTRING_LEN];
#define SMB_BIG_UINT unsigned long
#endif
+#ifndef MAXSUBAUTHS
+#define MAXSUBAUTHS 15 /* max sub authorities in a SID */
+#endif
+
+#ifndef uint8
+#define uint8 unsigned char
+#endif
+
+#if !defined(uint32) && !defined(HAVE_UINT32_FROM_RPC_RPC_H)
+#if (SIZEOF_INT == 4)
+#define uint32 unsigned int
+#elif (SIZEOF_LONG == 4)
+#define uint32 unsigned long
+#elif (SIZEOF_SHORT == 4)
+#define uint32 unsigned short
+#endif
+#endif
+
+#ifndef _DOM_SID
+/* DOM_SID - security id */
+typedef struct sid_info
+{
+ uint8 sid_rev_num; /* SID revision number */
+ uint8 num_auths; /* number of sub-authorities */
+ uint8 id_auth[6]; /* Identifier Authority */
+ /*
+ * Note that the values in these uint32's are in *native* byteorder,
+ * not neccessarily little-endian...... JRA.
+ */
+ uint32 sub_auths[MAXSUBAUTHS]; /* pointer to sub-authorities. */
+
+} DOM_SID;
+#define _DOM_SID
+#endif
+
+/*
+ * The complete list of SIDS belonging to this user.
+ * Created when a vuid is registered.
+ */
+
+#ifndef _NT_USER_TOKEN
+typedef struct _nt_user_token {
+ size_t num_sids;
+ DOM_SID *user_sids;
+} NT_USER_TOKEN;
+#define _NT_USER_TOKEN
+#endif
+
/* Information from the connection_struct passed to the vfs layer */
struct vfs_connection_struct {
@@ -93,6 +141,7 @@ struct vfs_connection_struct {
gid_t gid;
int ngroups;
gid_t *groups;
+ NT_USER_TOKEN *nt_user_token;
};
/* Avoid conflict with an AIX include file */