Add const, kill of useless casts and therefore eliminate warnings.
authorAndrew Bartlett <abartlet@samba.org>
Fri, 14 Jun 2002 00:47:08 +0000 (00:47 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 14 Jun 2002 00:47:08 +0000 (00:47 +0000)
Andrew Bartlett
(This used to be commit 29490f214750acd44cee6c4ab1354722d82d853a)

source3/lib/util_sid.c
source3/passdb/passdb.c
source3/rpc_server/srv_samr_nt.c

index 3ad9e909d8767ba04451965207baa0e88977c4d2..ca9ebb14d28284d8a1f5852aef67d650b5a5057d 100644 (file)
@@ -252,7 +252,7 @@ BOOL sid_split_rid(DOM_SID *sid, uint32 *rid)
  Return the last rid from the end of a sid
 *****************************************************************/  
 
-BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid)
+BOOL sid_peek_rid(const DOM_SID *sid, uint32 *rid)
 {
        if (!sid || !rid)
                return False;           
@@ -269,7 +269,7 @@ BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid)
  and check the sid against the exp_dom_sid  
 *****************************************************************/  
 
-BOOL sid_peek_check_rid(DOM_SID *exp_dom_sid,DOM_SID *sid, uint32 *rid)
+BOOL sid_peek_check_rid(const DOM_SID *exp_dom_sid, const DOM_SID *sid, uint32 *rid)
 {
        if (!exp_dom_sid || !sid || !rid)
                return False;
@@ -280,7 +280,7 @@ BOOL sid_peek_check_rid(DOM_SID *exp_dom_sid,DOM_SID *sid, uint32 *rid)
                return False;
        }
        
-       return sid_peek_rid(sid,rid);
+       return sid_peek_rid(sid, rid);
 }
 
 /*****************************************************************
index 31bbf14299f4842ed8563989bd986b0218669776..fa1bb4b2d9d7680d366734dcbce52025019101a1 100644 (file)
@@ -701,7 +701,7 @@ BOOL local_lookup_name(const char *c_user, DOM_SID *psid, enum SID_NAME_USE *psi
        }
        
        if (pdb_getsampwnam(sam_account, user)) {
-               sid_copy(psid, (DOM_SID *) pdb_get_user_sid(sam_account));
+               sid_copy(psid, pdb_get_user_sid(sam_account));
                *psid_name_use = SID_NAME_USER;
                
                pdb_free_sam(&sam_account);
@@ -776,7 +776,7 @@ DOM_SID *local_uid_to_sid(DOM_SID *psid, uid_t uid)
                }
                
                if (pdb_getsampwnam(sam_user, pass->pw_name)) {
-                       sid_copy(psid, (DOM_SID *) pdb_get_user_sid(sam_user));
+                       sid_copy(psid, pdb_get_user_sid(sam_user));
                } else {
                        sid_append_rid(psid, fallback_pdb_uid_to_user_rid(uid));
                }
index a6f936fecafeb8c1c352ffcc9b9ee9b243bfdcf5..94be26b16cf847360083af536767ffa912791da3 100644 (file)
@@ -2020,7 +2020,7 @@ NTSTATUS _api_samr_create_user(pipes_struct *p, SAMR_Q_CREATE_USER *q_u, SAMR_R_
        }
        
        /* Get the user's SID */
-       sid_copy(&sid, (DOM_SID *) pdb_get_user_sid(sam_pass));
+       sid_copy(&sid, pdb_get_user_sid(sam_pass));
        
        /* associate the user's SID with the new handle. */
        if ((info = get_samr_info_by_sid(&sid)) == NULL) {