diff options
author | Luke Leighton <lkcl@samba.org> | 2000-06-09 03:00:34 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 2000-06-09 03:00:34 +0000 |
commit | ad98207f54a7e3d88108d34c4cf365d5f8bc23ef (patch) | |
tree | b23fa45bf861976ae96b27353cfed15b659cfb8c /source3/include/smb_macros.h | |
parent | eee003da6aee5ffc00e318fc0390e6b19151a675 (diff) | |
download | samba-ad98207f54a7e3d88108d34c4cf365d5f8bc23ef.tar.gz samba-ad98207f54a7e3d88108d34c4cf365d5f8bc23ef.tar.bz2 samba-ad98207f54a7e3d88108d34c4cf365d5f8bc23ef.zip |
dynamic allocation of NET_USER_INFO_3 gids.
jeremy, the intent is to call se_access_check() with usr-sid, grp-sid,
array-of-group-rids (but array-of-group-sids would do).
please do look at smbd/lanman.c's api_NetWkstaGetInfo, it will show you
that we really do need to store the entire NET_USER_INFO_3 structure.
then again, api_NetWkstaGetInfo is only used by win9x so who cares :)
(This used to be commit bd34f652390adc32c4959d164c628687f526d977)
Diffstat (limited to 'source3/include/smb_macros.h')
-rw-r--r-- | source3/include/smb_macros.h | 8 |
1 files changed, 8 insertions, 0 deletions
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)) |