Line data Source code
1 : /* 2 : * Unix SMB/CIFS implementation. 3 : * 4 : * This program is free software; you can redistribute it and/or modify 5 : * it under the terms of the GNU General Public License as published by 6 : * the Free Software Foundation; either version 3 of the License, or 7 : * (at your option) any later version. 8 : * 9 : * This program is distributed in the hope that it will be useful, 10 : * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 : * GNU General Public License for more details. 13 : * 14 : * You should have received a copy of the GNU General Public License 15 : * along with this program; if not, see <http://www.gnu.org/licenses/>. 16 : */ 17 : 18 : #include "includes.h" 19 : #include "source3/locking/proto.h" 20 : #include "rpc_worker.h" 21 : #include "librpc/gen_ndr/ndr_mdssvc.h" 22 : #include "librpc/gen_ndr/ndr_mdssvc_scompat.h" 23 : 24 35 : static size_t mdssvc_interfaces( 25 : const struct ndr_interface_table ***pifaces, 26 : void *private_data) 27 : { 28 : static const struct ndr_interface_table *ifaces[] = { 29 : &ndr_table_mdssvc, 30 : }; 31 : 32 35 : *pifaces = ifaces; 33 35 : return ARRAY_SIZE(ifaces); 34 : } 35 : 36 0 : static size_t mdssvc_servers( 37 : struct dcesrv_context *dce_ctx, 38 : const struct dcesrv_endpoint_server ***_ep_servers, 39 : void *private_data) 40 : { 41 : static const struct dcesrv_endpoint_server *ep_servers[1] = { NULL }; 42 : bool ok; 43 : 44 0 : lp_load_with_shares(get_dyn_CONFIGFILE()); 45 : 46 0 : ok = posix_locking_init(false); 47 0 : if (!ok) { 48 0 : DBG_ERR("posix_locking_init() failed\n"); 49 0 : exit(1); 50 : } 51 : 52 0 : ep_servers[0] = mdssvc_get_ep_server(); 53 : 54 0 : *_ep_servers = ep_servers; 55 0 : return ARRAY_SIZE(ep_servers); 56 : } 57 : 58 35 : int main(int argc, const char *argv[]) 59 : { 60 35 : return rpc_worker_main( 61 : argc, 62 : argv, 63 : "rpcd_mdssvc", 64 : 5, 65 : 60, 66 : mdssvc_interfaces, 67 : mdssvc_servers, 68 : NULL); 69 : }