Summary of group API discussion V1

Stefan (metze) Metzmacher metze at metzemix.de
Tue Jun 18 22:38:02 GMT 2002


Hi Andrew, hi Kai,

here's a little summary of our lastest discusion.

should we need  TALLOC_CTX *mem_ctx; somewhere else?
---------------------------------

typedef _SAM_GROUP {
         char *name;
         char *comment;

         DOM_SID sid;

         /* here we can store some use full info about the group
          - group type local,domain,builtin, ...
         */
         int32 flags;
         PRIVILEGE_SET priv_set;

         /* specify the groupdb backend */
         struct gdb_methods *method;
} SAM_GROUP

typedef _SAM_GROUP_MAP {
         char *name;
         DOM_SID sid;
         gid_t gid;

         /* here we can store some use full info about the group
          - group type local,domain,builtin, ...
         */
         int32 flags;

         /* Did we need the PRIVILEGE_SET here? */

         /* specify the groupdb backend */
         struct gdb_methos *method;
} SAM_GROUP_MAP

typedef _SAM_GROUP_MEMBER {
         DOM_SID sid;

         /*Is the member a group or user?*/
         BOOL group;

         /* if we store the member in the group backend
            or this group the primary Group of the member ?
         */
         BOOL stored;
} SAM_GROUP_MAP

typedef _SAM_GROUP_ENTRY {
         char *name;
         char *comment;

         DOM_SID sid;
         gid_t gid;

         /* here we can store some use full info about the group
          - group type local,domain,builtin, ...
         */
         int32 flags;
         PRIVILEGE_SET priv_set;

         int32 members_count;
         SAM_GROUP_MEMBER **members;

         TALLOC_CTX *mem_ctx;

         /* specify the groupdb backend */
         struct gdb_methods *method;
} SAM_GROUP_MAP



GROUP API:

Were should we use only the SID and not SAM_GROUP ?

NTSTATUS gdb_add_samgroup(SAM_GROUP *samgroup) //should call gdb_add_mapping
NTSTATUS gdb_update_samgroup(SAM_GROUP *samgroup)
NTSTATUS gdb_delete_samgroup(SAM_GROUP *samgroup)//should call 
gdb_delete_mapping

NTSTATUS gdb_enum_groups(int32 *groups_count, SAM_GROUP **groups, int32 flag)

NTSTATUS gdb_get_group_by_sid(SAM_GROUP **samgroup, DOM_SID *sid)
NTSTATUS gdb_get_group_by_name(SAM_GROUP **samgroup,char *domain ,char *name)

NTSTATUS gdb_add_member_to_group(SAM_GROUP *samgroup, SAM_GROUP_MEMBER *member)
NTSTATUS gdb_delete_member_from_group(SAM_GROUP *samgroup, SAM_GROUP_MEMBER 
*member)
NTSTATUS gdb_enum_members(DOM_SID *group_sid, int32 *members_count, 
SAM_GROUP_MEMBER **members)

(Not discussed yet! :-)
GROUP MAPPING API:

NTSTATUS gdb_add_mapping(SAM_GROUP_MAP *gmap)
NTSTATUS gdb_update_mapping(SAM_GROUP_MAP *gmap)
NTSTATUS gdb_delete_mapping(SAM_GROUP_MAP *gmap)

NTSTATUS gdb_enum_mappings(int32 *mappings_count, SAM_GROUP_MAP 
**mappings,int32 flag)

NTSTATUS gdb_get_mapping_by_sid(SAM_GROUP_MAP **mapping, DOM_SID *sid)
NTSTATUS gdb_get_mapping_by_gid(SAM_GROUP_MAP **mapping, gid_t gid)
NTSTATUS gdb_get_mapping_by_name(SAM_GROUP_MAP **mapping,char *domain ,char 
*name) //Did we need char *domain here?

GROUP BACKEND API:

...later:-)


metze
-----------------------------------------------------------------------------
Stefan "metze" Metzmacher <metze at metzemix.de>





More information about the samba-technical mailing list