summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/rpc_netlogon.h4
-rw-r--r--source3/include/smb_macros.h8
2 files changed, 10 insertions, 2 deletions
diff --git a/source3/include/rpc_netlogon.h b/source3/include/rpc_netlogon.h
index 06caa53f4d..9f6757ca63 100644
--- a/source3/include/rpc_netlogon.h
+++ b/source3/include/rpc_netlogon.h
@@ -57,7 +57,7 @@ typedef struct net_user_info_2
uint32 group_id; /* Group ID */
....
uint32 num_groups2; /* num groups */
- DOM_GID gids[LSA_MAX_GROUPS]; /* group info */
+ DOM_GID *gids; /* group info */
UNIHDR hdr_logon_srv; /* logon server unicode string header */
UNISTR2 uni_logon_dom; /* logon domain unicode string */
@@ -114,7 +114,7 @@ typedef struct net_user_info_3
UNISTR2 uni_dir_drive; /* home directory drive unicode string */
uint32 num_groups2; /* num groups */
- DOM_GID gids[LSA_MAX_GROUPS]; /* group info */
+ DOM_GID *gids; /* group info */
UNISTR2 uni_logon_srv; /* logon server unicode string */
UNISTR2 uni_logon_dom; /* logon domain unicode string */
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 51c7c1c638..267b061f65 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -42,6 +42,14 @@
#define IS_DOS_SYSTEM(test_mode) (((test_mode) & aSYSTEM) != 0)
#define IS_DOS_HIDDEN(test_mode) (((test_mode) & aHIDDEN) != 0)
+/* memory-allocation-helpers (idea and names from glib) */
+#define g_new(type, count) \
+ ((type *) malloc(sizeof(type) * (count)))
+#define g_new0(type, count) \
+ ((type *) calloc((count), sizeof(type)))
+#define g_renew(type, mem, count) \
+ ((type *) Realloc(mem, sizeof(type) * (count)))
+
/* zero a structure */
#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))