2 * Unix SMB/CIFS implementation.
3 * RPC Pipe client / server routines
4 * Copyright (C) Gerald Carter 2003
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 /* This is the interface for the registry functions. */
25 #define DBGC_CLASS DBGC_RPC_SRV
27 /*******************************************************************
28 ********************************************************************/
30 static BOOL
api_dsrole_get_primary_dominfo(pipes_struct
*p
)
32 DS_Q_GETPRIMDOMINFO q_u
;
33 DS_R_GETPRIMDOMINFO r_u
;
34 prs_struct
*data
= &p
->in_data
.data
;
35 prs_struct
*rdata
= &p
->out_data
.rdata
;
40 /* grab the request */
41 if ( !ds_io_q_getprimdominfo("", &q_u
, data
, 0) )
44 /* construct reply. */
45 r_u
.status
= _dsrole_get_primary_dominfo( p
, &q_u
, &r_u
);
47 if ( !ds_io_r_getprimdominfo("", &r_u
, rdata
, 0) )
53 /*******************************************************************
54 stub functions for unimplemented RPC
55 *******************************************************************/
57 static BOOL
api_dsrole_stub( pipes_struct
*p
)
59 DEBUG(0,("api_dsrole_stub: Hmmm....didn't know this RPC existed...\n"));
65 /*******************************************************************
66 array of \PIPE\lsass (new windows 2000 UUID) operations
67 ********************************************************************/
68 static struct api_struct api_lsa_ds_cmds
[] = {
69 { "DS_NOP", DS_NOP
, api_dsrole_stub
},
70 { "DS_GETPRIMDOMINFO", DS_GETPRIMDOMINFO
, api_dsrole_get_primary_dominfo
}
74 void lsa_ds_get_pipe_fns( struct api_struct
**fns
, int *n_fns
)
76 *fns
= api_lsa_ds_cmds
;
77 *n_fns
= sizeof(api_lsa_ds_cmds
) / sizeof(struct api_struct
);
81 NTSTATUS
rpc_lsa_ds_init(void)
83 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION
, "lsa_ds", "lsa_ds", api_lsa_ds_cmds
,
84 sizeof(api_lsa_ds_cmds
) / sizeof(struct api_struct
));