Author: skel Date: 2005-08-23 16:47:47 +0000 (Tue, 23 Aug 2005) New Revision: 9531
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9531 Log: cleaned up most of the compiler warnings Modified: branches/SOC/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c branches/SOC/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c Changeset: Modified: branches/SOC/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c =================================================================== --- branches/SOC/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c 2005-08-23 16:44:03 UTC (rev 9530) +++ branches/SOC/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c 2005-08-23 16:47:47 UTC (rev 9531) @@ -318,7 +318,7 @@ /*now actually lookup the names*/ hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, num_names, - op->in.names, &sids, &types); + (const char **)op->in.names, &sids, &types); if(NT_STATUS_IS_OK(hnd->status)) { /*this is the easy part, just make the out.sids array*/ @@ -620,10 +620,10 @@ if(op->in.name && !op->in.sid) { DOM_SID *user_sid = NULL; - uint32 type; + uint32 *type; /*lookup the SID*/ - hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, 1, &(op->in.name), &user_sid, &type); + hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, 1, (const char **)&(op->in.name), &user_sid, &type); if(!NT_STATUS_IS_OK(hnd->status)) return CAC_FAILURE; @@ -858,10 +858,10 @@ /*look up the user's SID if we have to*/ if(op->in.name && !op->in.sid) { DOM_SID *user_sid = NULL; - uint32 type; + uint32 *type; /*lookup the SID*/ - hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, 1, &(op->in.name), &user_sid, &type); + hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, 1, (const char **)&(op->in.name), &user_sid, &type); if(!NT_STATUS_IS_OK(hnd->status)) return CAC_FAILURE; @@ -922,7 +922,7 @@ if(op->in.name && !op->in.sid) { /*lookup the SID*/ - hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, 1, &(op->in.name), &user_sid, &type); + hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, 1, (const char **)&(op->in.name), &user_sid, &type); if(!NT_STATUS_IS_OK(hnd->status)) return CAC_FAILURE; @@ -930,7 +930,7 @@ op->in.sid = user_sid; } - hnd->status = cli_lsa_add_account_rights( &(srv->cli), mem_ctx, op->in.pol, *(op->in.sid), op->in.num_privs, op->in.priv_names); + hnd->status = cli_lsa_add_account_rights( &(srv->cli), mem_ctx, op->in.pol, *(op->in.sid), op->in.num_privs, (const char **)op->in.priv_names); if(!NT_STATUS_IS_OK(hnd->status)) { return CAC_FAILURE; @@ -964,7 +964,7 @@ return CAC_FAILURE; } - srv = cac_GetServer; + srv = cac_GetServer(hnd); if(!srv) { return CAC_FAILURE; } @@ -973,7 +973,7 @@ if(op->in.name && !op->in.sid) { /*lookup the SID*/ - hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, 1, &(op->in.name), &user_sid, &type); + hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, 1, (const char **)&(op->in.name), &user_sid, &type); if(!NT_STATUS_IS_OK(hnd->status)) return CAC_FAILURE; @@ -981,7 +981,7 @@ op->in.sid = user_sid; } - hnd->status = cli_lsa_remove_account_rights( &(srv->cli), mem_ctx, op->in.pol, *(op->in.sid), False, op->in.num_privs, op->in.priv_names); + hnd->status = cli_lsa_remove_account_rights( &(srv->cli), mem_ctx, op->in.pol, *(op->in.sid), False, op->in.num_privs, (const char **)op->in.priv_names); if(!NT_STATUS_IS_OK(hnd->status)) { return CAC_FAILURE; @@ -1024,7 +1024,7 @@ if(op->in.name && !op->in.sid) { /*lookup the SID*/ - hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, 1, &(op->in.name), &user_sid, &type); + hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, 1, (const char **)&(op->in.name), &user_sid, &type); if(!NT_STATUS_IS_OK(hnd->status)) return CAC_FAILURE; @@ -1066,7 +1066,7 @@ return CAC_FAILURE; } - srv = cac_GetServer; + srv = cac_GetServer(hnd); if(!srv) { return CAC_FAILURE; } @@ -1074,7 +1074,7 @@ if(op->in.name && !op->in.sid) { /*lookup the SID*/ - hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, 1, &(op->in.name), &user_sid, &type); + hnd->status = cli_lsa_lookup_names( &(srv->cli), mem_ctx, op->in.pol, 1, (const char **)&(op->in.name), &user_sid, &type); if(!NT_STATUS_IS_OK(hnd->status)) return CAC_FAILURE; @@ -1089,7 +1089,7 @@ return CAC_FAILURE; } - hnd->status = cli_lsa_add_account_rights( &(srv->cli), mem_ctx, op->in.pol, *(op->in.sid), op->in.num_privs, op->in.priv_names); + hnd->status = cli_lsa_add_account_rights( &(srv->cli), mem_ctx, op->in.pol, *(op->in.sid), op->in.num_privs, (const char **)op->in.priv_names); if(!NT_STATUS_IS_OK(hnd->status)) { return CAC_FAILURE; Modified: branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c =================================================================== --- branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c 2005-08-23 16:44:03 UTC (rev 9530) +++ branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c 2005-08-23 16:47:47 UTC (rev 9531) @@ -234,7 +234,7 @@ if(op->in.rid == 0 && op->in.username) { /*lookup the name and then set rid_buf*/ - hnd->status = cli_samr_lookup_names( &(srv->cli), mem_ctx, op->in.sam, SAMR_LOOKUP_FLAGS, 1, &op->in.username, + hnd->status = cli_samr_lookup_names( &(srv->cli), mem_ctx, op->in.sam, SAMR_LOOKUP_FLAGS, 1, (const char **)&op->in.username, &num_rids, &rid_buf, &rid_types); if(!NT_STATUS_IS_OK(hnd->status)) @@ -502,7 +502,7 @@ srv->cli.pipe_idx = PI_SAMR; - hnd->status = cli_samr_lookup_names( &(srv->cli), mem_ctx, op->in.domain, SAMR_LOOKUP_FLAGS, op->in.num_names, op->in.names, + hnd->status = cli_samr_lookup_names( &(srv->cli), mem_ctx, op->in.domain, SAMR_LOOKUP_FLAGS, op->in.num_names, (const char **)op->in.names, &num_rids_out, &rids_out, &rid_types_out); if(!NT_STATUS_IS_OK(hnd->status) && !NT_STATUS_EQUAL(hnd->status, STATUS_SOME_UNMAPPED)) Modified: branches/SOC/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c =================================================================== --- branches/SOC/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c 2005-08-23 16:44:03 UTC (rev 9530) +++ branches/SOC/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c 2005-08-23 16:47:47 UTC (rev 9531) @@ -188,13 +188,7 @@ REG_VALUE_DATA *cac_MakeRegValueData(TALLOC_CTX *mem_ctx, uint32 data_type, REGVAL_BUFFER buf) { REG_VALUE_DATA *data; - uint32 i = 0; uint32 size = 0; - uint32 num_strings = 0; - char **strings = NULL; - uint32 buf_idx = 0; - uint32 bytes_used = 0; - uint32 cur_size = 0; data = talloc(mem_ctx, REG_VALUE_DATA); if(!data) { @@ -358,8 +352,7 @@ NTTIME pass_can_change_time; NTTIME pass_must_change_time; - char pw[516]; - char dummy[1] = "\0"; + uchar pw[516]; ctr = talloc(mem_ctx, SAM_USERINFO_CTR); if(!ctr) @@ -382,8 +375,7 @@ unix_to_nt_time(&pass_can_change_time, info->pass_can_change_time); unix_to_nt_time(&pass_must_change_time, info->pass_must_change_time); - encode_pw_buffer(pw, dummy, STR_UNICODE); - + encode_pw_buffer(pw, info->new_password, STR_UNICODE); /*manually set passmustchange*/ ctr->info.id23->passmustchange = (info->pass_must_change) ? 0x01 : 0x00;