Print this page
1575 untangle libmlrpc ... (smbsrv)


  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 /*
  27  * Client side for the DSSETUP RPC service.
  28  */
  29 
  30 #include <string.h>
  31 #include <strings.h>
  32 #include <smbsrv/wintypes.h>
  33 #include <smbsrv/libsmb.h>
  34 #include <smbsrv/ndl/dssetup.ndl>
  35 #include <smbsrv/libmlsvc.h>
  36 
  37 int
  38 dssetup_get_domain_info(ds_primary_domain_info_t *ds_info)
  39 {
  40         dssetup_DsRoleGetPrimaryDomainInfo_t arg;
  41         struct dssetup_DsRolePrimaryDomInfo1 *info;
  42         smb_domainex_t di;
  43         mlsvc_handle_t handle;
  44         int opnum;
  45         int rc;
  46 
  47         if (!smb_domain_getinfo(&di))
  48                 return (-1);
  49 
  50         if (ndr_rpc_bind(&handle, di.d_dci.dc_name, di.d_primary.di_nbname,
  51             MLSVC_ANON_USER, "DSSETUP") != 0)
  52                 return (-1);




  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 /*
  27  * Client side for the DSSETUP RPC service.
  28  */
  29 
  30 #include <string.h>
  31 #include <strings.h>
  32 #include <smb/wintypes.h>
  33 #include <smbsrv/libsmb.h>
  34 #include <smbsrv/ndl/dssetup.ndl>
  35 #include <smbsrv/libmlsvc.h>
  36 
  37 int
  38 dssetup_get_domain_info(ds_primary_domain_info_t *ds_info)
  39 {
  40         dssetup_DsRoleGetPrimaryDomainInfo_t arg;
  41         struct dssetup_DsRolePrimaryDomInfo1 *info;
  42         smb_domainex_t di;
  43         mlsvc_handle_t handle;
  44         int opnum;
  45         int rc;
  46 
  47         if (!smb_domain_getinfo(&di))
  48                 return (-1);
  49 
  50         if (ndr_rpc_bind(&handle, di.d_dci.dc_name, di.d_primary.di_nbname,
  51             MLSVC_ANON_USER, "DSSETUP") != 0)
  52                 return (-1);