r25598: Add missing become_root/unbecome_root around calls of add_aliases.
[samba.git] / source / libmsrpc / cac_winreg.c
index 0bc1f15c3394faf030074c517f5034f5bf868536..0470d2a80f9bb92dffadeef39b21f218091ce7d6 100644 (file)
@@ -6,7 +6,7 @@
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
  *  
  *  This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
  *  GNU General Public License for more details.
  *  
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "libmsrpc.h"
@@ -775,14 +774,14 @@ int cac_RegEnumValues( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
        }
 
        /*we need to assume that the max number of values will be enumerated */
-       types_out = talloc_array( mem_ctx, uint32, op->in.max_values );
+       types_out = TALLOC_ARRAY( mem_ctx, uint32, op->in.max_values );
 
        if ( !types_out ) {
                hnd->status = NT_STATUS_NO_MEMORY;
                return CAC_FAILURE;
        }
 
-       values_out = talloc_array( mem_ctx, REG_VALUE_DATA *, 
+       values_out = TALLOC_ARRAY( mem_ctx, REG_VALUE_DATA *, 
                                   op->in.max_values );
 
        if ( !values_out ) {
@@ -791,7 +790,7 @@ int cac_RegEnumValues( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
                return CAC_FAILURE;
        }
 
-       val_names_out = talloc_array( mem_ctx, char *, op->in.max_values );
+       val_names_out = TALLOC_ARRAY( mem_ctx, char *, op->in.max_values );
 
        if ( !val_names_out ) {
                TALLOC_FREE( types_out );
@@ -847,7 +846,7 @@ int cac_RegEnumValues( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
                hnd->status = rpccli_winreg_EnumValue( pipe_hnd, mem_ctx, 
                                                       op->in.key,
                                                       resume_idx, &name_buf,
-                                                      &types_out[num_values_out], &buffer,
+                                                      &types_out[num_values_out], buffer,
                                                       &data_size,
                                                       &data_length );