summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-05-31 13:46:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:02 -0500
commitf24d88cf9da46680d52b42b92bd484e7b09ce99b (patch)
treeb30342fd7677a0d17306130077995110bfae344a /source3/include
parent450e8d5749504f8392c0cfe8b79218f03b88076a (diff)
downloadsamba-f24d88cf9da46680d52b42b92bd484e7b09ce99b.tar.gz
samba-f24d88cf9da46680d52b42b92bd484e7b09ce99b.tar.bz2
samba-f24d88cf9da46680d52b42b92bd484e7b09ce99b.zip
r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1
(This used to be commit 9727d05241574042dd3aa8844ae5c701d22e2da1)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/rpc_lsa.h119
-rw-r--r--source3/include/rpc_misc.h10
-rw-r--r--source3/include/rpc_netlogon.h13
-rw-r--r--source3/include/smb_macros.h7
4 files changed, 120 insertions, 29 deletions
diff --git a/source3/include/rpc_lsa.h b/source3/include/rpc_lsa.h
index 8eaf68a234..fe444bfdd1 100644
--- a/source3/include/rpc_lsa.h
+++ b/source3/include/rpc_lsa.h
@@ -46,11 +46,11 @@
#define LSA_CLEARAUDITLOG 0x09
#define LSA_CREATEACCOUNT 0x0a
#define LSA_ENUM_ACCOUNTS 0x0b
-#define LSA_CREATETRUSTDOM 0x0c
+#define LSA_CREATETRUSTDOM 0x0c /* TODO: implement this one -- jerry */
#define LSA_ENUMTRUSTDOM 0x0d
#define LSA_LOOKUPNAMES 0x0e
#define LSA_LOOKUPSIDS 0x0f
-#define LSA_CREATESECRET 0x10
+#define LSA_CREATESECRET 0x10 /* TODO: implement this one -- jerry */
#define LSA_OPENACCOUNT 0x11
#define LSA_ENUMPRIVSACCOUNT 0x12
#define LSA_ADDPRIVS 0x13
@@ -59,16 +59,16 @@
#define LSA_SETQUOTAS 0x16
#define LSA_GETSYSTEMACCOUNT 0x17
#define LSA_SETSYSTEMACCOUNT 0x18
-#define LSA_OPENTRUSTDOM 0x19
+#define LSA_OPENTRUSTDOM 0x19 /* TODO: implement this one -- jerry */
#define LSA_QUERYTRUSTDOM 0x1a
#define LSA_SETINFOTRUSTDOM 0x1b
-#define LSA_OPENSECRET 0x1c
-#define LSA_SETSECRET 0x1d
+#define LSA_OPENSECRET 0x1c /* TODO: implement this one -- jerry */
+#define LSA_SETSECRET 0x1d /* TODO: implement this one -- jerry */
#define LSA_QUERYSECRET 0x1e
#define LSA_LOOKUPPRIVVALUE 0x1f
#define LSA_LOOKUPPRIVNAME 0x20
#define LSA_PRIV_GET_DISPNAME 0x21
-#define LSA_DELETEOBJECT 0x22
+#define LSA_DELETEOBJECT 0x22 /* TODO: implement this one -- jerry */
#define LSA_ENUMACCTWITHRIGHT 0x23 /* TODO: implement this one -- jerry */
#define LSA_ENUMACCTRIGHTS 0x24
#define LSA_ADDACCTRIGHTS 0x25
@@ -475,25 +475,6 @@ typedef struct lsa_r_lookup_names
NTSTATUS status; /* return code */
} LSA_R_LOOKUP_NAMES;
-/* This is probably a policy handle but at the moment we
- never read it - so use a dummy struct. */
-
-typedef struct lsa_q_open_secret
-{
- uint32 dummy;
-} LSA_Q_OPEN_SECRET;
-
-/* We always return "not found" at present - so just marshal the minimum. */
-
-typedef struct lsa_r_open_secret
-{
- uint32 dummy1;
- uint32 dummy2;
- uint32 dummy3;
- uint32 dummy4;
- NTSTATUS status;
-} LSA_R_OPEN_SECRET;
-
typedef struct lsa_enum_priv_entry
{
UNIHDR hdr_name;
@@ -742,4 +723,92 @@ typedef struct lsa_r_removeprivs
NTSTATUS status;
} LSA_R_REMOVEPRIVS;
+/*******************************************************/
+
+typedef struct {
+ POLICY_HND handle;
+ uint32 count; /* ??? this is what ethereal calls it */
+ DOM_SID sid;
+} LSA_Q_OPEN_TRUSTED_DOMAIN;
+
+typedef struct {
+ POLICY_HND handle;
+ NTSTATUS status;
+} LSA_R_OPEN_TRUSTED_DOMAIN;
+
+
+/*******************************************************/
+
+typedef struct {
+ POLICY_HND handle;
+ UNISTR4 secretname;
+ uint32 access;
+} LSA_Q_OPEN_SECRET;
+
+typedef struct {
+ POLICY_HND handle;
+ NTSTATUS status;
+} LSA_R_OPEN_SECRET;
+
+
+/*******************************************************/
+
+typedef struct {
+ POLICY_HND handle;
+} LSA_Q_DELETE_OBJECT;
+
+typedef struct {
+ NTSTATUS status;
+} LSA_R_DELETE_OBJECT;
+
+
+/*******************************************************/
+
+typedef struct {
+ POLICY_HND handle;
+ UNISTR4 secretname;
+ uint32 access;
+} LSA_Q_CREATE_SECRET;
+
+typedef struct {
+ POLICY_HND handle;
+ NTSTATUS status;
+} LSA_R_CREATE_SECRET;
+
+
+/*******************************************************/
+
+typedef struct {
+ POLICY_HND handle;
+ UNISTR4 secretname;
+ uint32 access;
+} LSA_Q_CREATE_TRUSTED_DOMAIN;
+
+typedef struct {
+ POLICY_HND handle;
+ NTSTATUS status;
+} LSA_R_CREATE_TRUSTED_DOMAIN;
+
+
+/*******************************************************/
+
+typedef struct {
+ uint32 size; /* size is written on the wire twice so I
+ can only assume that one is supposed to
+ be a max length and one is a size */
+ UNISTR2 *data; /* not really a UNICODE string but the parsing
+ is the same */
+} LSA_DATA_BLOB;
+
+typedef struct {
+ POLICY_HND handle;
+ LSA_DATA_BLOB *old_value;
+ LSA_DATA_BLOB *new_value;
+} LSA_Q_SET_SECRET;
+
+typedef struct {
+ NTSTATUS status;
+} LSA_R_SET_SECRET;
+
+
#endif /* _RPC_LSA_H */
diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h
index dcc0ecc554..9f35450d95 100644
--- a/source3/include/rpc_misc.h
+++ b/source3/include/rpc_misc.h
@@ -129,17 +129,20 @@ typedef struct {
* Buffer Headers -- use by SEC_DESC_BUF in winreg and netlogon code
**********************************************************************/
+/* TODO: replace this with an encompassing buffer structure */
typedef struct {
uint32 buf_max_len;
uint32 buf_len;
} BUFHDR;
+/* this is a BUFHDR + a pointer to a buffer */
typedef struct {
uint32 info_level;
uint32 length; /* uint8 chars */
uint32 buffer;
} BUFHDR2;
+/* generic buffer ? wrapped around void*? */
typedef struct {
uint32 size;
uint32 buffer;
@@ -152,7 +155,8 @@ typedef struct {
/* buffer used by \winreg\ calls to fill in arbitrary REG_XXX values.
It *may* look like a UNISTR2 but it is *not*. This is not a goof
- by the winreg developers. It is a generic buffer */
+ by the winreg developers. It is a generic buffer. buffer length
+ is stored in bytes (not # of uint16's) */
typedef struct {
uint32 buf_max_len;
@@ -215,10 +219,12 @@ typedef struct { /* UNISTR2 - unicode string size (in
should include the NULL character */
} UNISTR2;
+/* i think this is the same as a BUFFER5 used in the spoolss code --jerry */
+/* not sure about how the termination matches between the uint16 buffers thought */
+
typedef struct { /* UNISTR3 - XXXX not sure about this structure */
uint32 uni_str_len;
UNISTR str;
-
} UNISTR3;
typedef struct { /* Buffer wrapped around a UNISTR2 */
diff --git a/source3/include/rpc_netlogon.h b/source3/include/rpc_netlogon.h
index 6812358575..b3fe16ba2b 100644
--- a/source3/include/rpc_netlogon.h
+++ b/source3/include/rpc_netlogon.h
@@ -4,7 +4,7 @@
Copyright (C) Andrew Tridgell 1992-1997
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
Copyright (C) Paul Ashton 1997
- Copyright (C) Jean François Micouleau 2002
+ Copyright (C) Jean François Micouleau 2002
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -68,11 +68,22 @@
#define SAM_DATABASE_BUILTIN 0x01 /* BUILTIN users and groups */
#define SAM_DATABASE_PRIVS 0x02 /* Privileges */
+/* flags use when sending a NETLOGON_CONTROL request */
+
+#define NETLOGON_CONTROL_SYNC 0x2
#define NETLOGON_CONTROL_REDISCOVER 0x5
#define NETLOGON_CONTROL_TC_QUERY 0x6
#define NETLOGON_CONTROL_TRANSPORT_NOTIFY 0x7
#define NETLOGON_CONTROL_SET_DBFLAG 0xfffe
+/* Some flag values reverse engineered from NLTEST.EXE */
+/* used in the NETLOGON_CONTROL[2] reply */
+
+#define NL_CTRL_IN_SYNC 0x0000
+#define NL_CTRL_REPL_NEEDED 0x0001
+#define NL_CTRL_REPL_IN_PROGRESS 0x0002
+#define NL_CTRL_FULL_SYNC 0x0004
+
#if 0
/* I think this is correct - it's what gets parsed on the wire. JRA. */
/* NET_USER_INFO_2 */
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 7e90f01b5f..d798d4395e 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -43,7 +43,7 @@
* @note You are explicitly allowed to pass NULL pointers -- they will
* always be ignored.
**/
-#define SAFE_FREE(x) do { if ((x) != NULL) {free(CONST_DISCARD(void *, (x))); x=NULL;} } while(0)
+#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
#endif
/* zero a structure */
@@ -87,6 +87,7 @@
* extern struct current_user current_user;
*/
#define FSP_BELONGS_CONN(fsp,conn) do {\
+ extern struct current_user current_user;\
if (!((fsp) && (conn) && ((conn)==(fsp)->conn) && (current_user.vuid==(fsp)->vuid))) \
return(ERROR_DOS(ERRDOS,ERRbadfid));\
} while(0)
@@ -97,6 +98,7 @@
* extern struct current_user current_user;
*/
#define CHECK_FSP(fsp,conn) do {\
+ extern struct current_user current_user;\
if (!FNUM_OK(fsp,conn)) \
return(ERROR_DOS(ERRDOS,ERRbadfid)); \
else if((fsp)->fd == -1) \
@@ -289,6 +291,9 @@ copy an IP address from one buffer to another
#define TALLOC_REALLOC_ARRAY(ctx, ptr, type, count) (type *)_talloc_realloc_array(ctx, ptr, sizeof(type), count, #type)
#define talloc_destroy(ctx) talloc_free(ctx)
+/* only define PARANOID_MALLOC_CHECKER with --enable-developer and not compiling
+ the smbmount utils */
+
#if defined(DEVELOPER) && !defined(SMBMOUNT_MALLOC)
# define PARANOID_MALLOC_CHECKER 1
#endif