Apply some const
authorVolker Lendecke <vlendec@samba.org>
Wed, 10 Mar 2004 16:32:58 +0000 (16:32 +0000)
committerVolker Lendecke <vlendec@samba.org>
Wed, 10 Mar 2004 16:32:58 +0000 (16:32 +0000)
source/libsmb/samlogon_cache.c
source/nsswitch/winbindd.h
source/nsswitch/winbindd_ads.c
source/nsswitch/winbindd_cache.c
source/nsswitch/winbindd_rpc.c

index 72c10007bf4ab84fea2f249dede6c5ac2f55292e..4cd642c4e35a64a120c3f07ada88dd7176dd62e9 100644 (file)
@@ -157,7 +157,7 @@ BOOL netsamlogon_cache_store(TALLOC_CTX *mem_ctx, NET_USER_INFO_3 *user)
  free the user_info struct (malloc()'d memory)
 ***********************************************************************/
 
-NET_USER_INFO_3* netsamlogon_cache_get( TALLOC_CTX *mem_ctx, DOM_SID *user_sid)
+NET_USER_INFO_3* netsamlogon_cache_get( TALLOC_CTX *mem_ctx, const DOM_SID *user_sid)
 {
        NET_USER_INFO_3 *user = NULL;
        TDB_DATA        data, key;
@@ -218,7 +218,7 @@ NET_USER_INFO_3* netsamlogon_cache_get( TALLOC_CTX *mem_ctx, DOM_SID *user_sid)
        return user;
 }
 
-BOOL netsamlogon_cache_have(DOM_SID *user_sid)
+BOOL netsamlogon_cache_have(const DOM_SID *user_sid)
 {
        TALLOC_CTX *mem_ctx = talloc_init("netsamlogon_cache_have");
        NET_USER_INFO_3 *user = NULL;
index 340ea07733743eac4d24462426f76ef436e7e0af..cece2b40def70d5d2885ea9a05f9b4a1c80d7e87 100644 (file)
@@ -167,7 +167,7 @@ struct winbindd_methods {
        /* lookup user info for a given SID */
        NTSTATUS (*query_user)(struct winbindd_domain *domain, 
                               TALLOC_CTX *mem_ctx, 
-                              DOM_SID *user_sid,
+                              const DOM_SID *user_sid,
                               WINBIND_USERINFO *user_info);
 
        /* lookup all groups that a user is a member of. The backend
@@ -175,13 +175,13 @@ struct winbindd_methods {
           function */
        NTSTATUS (*lookup_usergroups)(struct winbindd_domain *domain,
                                      TALLOC_CTX *mem_ctx,
-                                     DOM_SID *user_sid,
+                                     const DOM_SID *user_sid,
                                      uint32 *num_groups, DOM_SID ***user_gids);
 
        /* find all members of the group with the specified group_rid */
        NTSTATUS (*lookup_groupmem)(struct winbindd_domain *domain,
                                    TALLOC_CTX *mem_ctx,
-                                   DOM_SID *group_sid,
+                                   const DOM_SID *group_sid,
                                    uint32 *num_names, 
                                    DOM_SID ***sid_mem, char ***names, 
                                    uint32 **name_types);
index e6b857f4061520c304cfcd6372a968766112f439..73c5af978c9aa4185264a0141a0306ee9371dd14 100644 (file)
@@ -390,7 +390,7 @@ failed:
 /* Lookup user information from a rid */
 static NTSTATUS query_user(struct winbindd_domain *domain, 
                           TALLOC_CTX *mem_ctx, 
-                          DOM_SID *sid, 
+                          const DOM_SID *sid, 
                           WINBIND_USERINFO *info)
 {
        ADS_STRUCT *ads = NULL;
@@ -561,7 +561,7 @@ done:
 /* Lookup groups a user is a member of. */
 static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
                                  TALLOC_CTX *mem_ctx,
-                                 DOM_SID *sid, 
+                                 const DOM_SID *sid, 
                                  uint32 *num_groups, DOM_SID ***user_gids)
 {
        ADS_STRUCT *ads = NULL;
@@ -659,7 +659,7 @@ done:
  */
 static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
                                TALLOC_CTX *mem_ctx,
-                               DOM_SID *group_sid, uint32 *num_names, 
+                               const DOM_SID *group_sid, uint32 *num_names, 
                                DOM_SID ***sid_mem, char ***names, 
                                uint32 **name_types)
 {
index 91834e476fc7a522f5b631a5a2538a932646e7e1..d684f6edfb4c90e72c8da028fef47725ba38c172 100644 (file)
@@ -1039,7 +1039,7 @@ do_query:
 /* Lookup user information from a rid */
 static NTSTATUS query_user(struct winbindd_domain *domain, 
                           TALLOC_CTX *mem_ctx, 
-                          DOM_SID *user_sid, 
+                          const DOM_SID *user_sid, 
                           WINBIND_USERINFO *info)
 {
        struct winbind_cache *cache = get_cache(domain);
@@ -1102,7 +1102,7 @@ do_query:
 /* Lookup groups a user is a member of. */
 static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
                                  TALLOC_CTX *mem_ctx,
-                                 DOM_SID *user_sid, 
+                                 const DOM_SID *user_sid, 
                                  uint32 *num_groups, DOM_SID ***user_gids)
 {
        struct winbind_cache *cache = get_cache(domain);
@@ -1185,7 +1185,7 @@ skip_save:
 
 static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
                                TALLOC_CTX *mem_ctx,
-                               DOM_SID *group_sid, uint32 *num_names, 
+                               const DOM_SID *group_sid, uint32 *num_names, 
                                DOM_SID ***sid_mem, char ***names, 
                                uint32 **name_types)
 {
index d4428a2f59c620a339a22cc6e0e9ef6e2b6b0dd7..25d5f64df67efc197bf87ee87a22c252b3a8c0e5 100644 (file)
@@ -366,7 +366,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
 /* Lookup user information from a rid or username. */
 static NTSTATUS query_user(struct winbindd_domain *domain, 
                           TALLOC_CTX *mem_ctx, 
-                          DOM_SID *user_sid, 
+                          const DOM_SID *user_sid, 
                           WINBIND_USERINFO *user_info)
 {
        CLI_POLICY_HND *hnd = NULL;
@@ -465,7 +465,7 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
 /* Lookup groups a user is a member of.  I wish Unix had a call like this! */
 static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
                                  TALLOC_CTX *mem_ctx,
-                                 DOM_SID *user_sid,
+                                 const DOM_SID *user_sid,
                                  uint32 *num_groups, DOM_SID ***user_grpsids)
 {
        CLI_POLICY_HND *hnd;
@@ -571,7 +571,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
 /* Lookup group membership given a rid.   */
 static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
                                TALLOC_CTX *mem_ctx,
-                               DOM_SID *group_sid, uint32 *num_names, 
+                               const DOM_SID *group_sid, uint32 *num_names, 
                                DOM_SID ***sid_mem, char ***names, 
                                uint32 **name_types)
 {