]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add context for resolving group membership from user object
authorNick Porter <nick@portercomputing.co.uk>
Tue, 28 Mar 2023 13:06:43 +0000 (14:06 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 4 Apr 2023 07:30:13 +0000 (08:30 +0100)
src/modules/rlm_ldap/groups.c

index 4c157c2cb2d76336063a9b9e1018ff39788bf74e..fd6276e751d9ad79922e5942117169539e12efa3 100644 (file)
@@ -35,6 +35,23 @@ USES_APPLE_DEPRECATED_API
 
 #include "rlm_ldap.h"
 
+/** Context to use when resolving group membership from the user object.
+ *
+ */
+typedef struct {
+       rlm_ldap_t const        *inst;                                  //!< Module instance.
+       fr_value_box_t          *base_dn;                               //!< The base DN to search for groups in.
+       fr_ldap_thread_trunk_t  *ttrunk;                                //!< Trunk on which to perform additional queries.
+       fr_pair_list_t          groups;                                 //!< Temporary list to hold pairs.
+       TALLOC_CTX              *list_ctx;                              //!< In which to allocate pairs.
+       char                    *group_name[LDAP_MAX_CACHEABLE + 1];    //!< List of group names which need resolving.
+       unsigned int            name_cnt;                               //!< How many names need resolving.
+       char                    *group_dn[LDAP_MAX_CACHEABLE + 1];      //!< List of group DNs which need resolving.
+       char                    **dn;                                   //!< Current DN being resolved.
+       char const              *attrs[2];                              //!< For resolving name from DN.
+       fr_ldap_query_t         *query;                                 //!< Current query performing group resolution.
+} ldap_group_userobj_ctx_t;
+
 /** Convert multiple group names into a DNs
  *
  * Given an array of group names, builds a filter matching all names, then retrieves all group objects