rpc_server/srv_lsa_ds.c

説明を見る。
00001 /*
00002  *  Unix SMB/CIFS implementation.
00003  *  RPC Pipe client / server routines
00004  *  Copyright (C) Gerald Carter         2003
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *  
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *  
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  */
00020 
00021 /* This is the interface for the registry functions. */
00022 
00023 #include "includes.h"
00024 
00025 #undef DBGC_CLASS
00026 #define DBGC_CLASS DBGC_RPC_SRV
00027 
00028 /*******************************************************************
00029  ********************************************************************/
00030 
00031 static BOOL api_dsrole_get_primary_dominfo(pipes_struct *p)
00032 {
00033         DS_Q_GETPRIMDOMINFO q_u;
00034         DS_R_GETPRIMDOMINFO r_u;
00035         prs_struct *data = &p->in_data.data;
00036         prs_struct *rdata = &p->out_data.rdata;
00037 
00038         ZERO_STRUCT(q_u);
00039         ZERO_STRUCT(r_u);
00040 
00041         /* grab the request */
00042         if ( !ds_io_q_getprimdominfo("", &q_u, data, 0) )
00043                 return False;
00044 
00045         /* construct reply. */
00046         r_u.status = _dsrole_get_primary_dominfo( p, &q_u, &r_u );
00047 
00048         if ( !ds_io_r_getprimdominfo("", &r_u, rdata, 0) )
00049                 return False;
00050 
00051         return True;
00052 }
00053 
00054 /*******************************************************************
00055  stub functions for unimplemented RPC
00056 *******************************************************************/
00057 
00058 static BOOL api_dsrole_stub( pipes_struct *p )
00059 {
00060         DEBUG(0,("api_dsrole_stub:  Hmmm....didn't know this RPC existed...\n"));
00061 
00062         return False;
00063 }
00064 
00065 
00066 /*******************************************************************
00067  array of \PIPE\lsass (new windows 2000 UUID)  operations
00068 ********************************************************************/
00069 static struct api_struct api_lsa_ds_cmds[] = {
00070         { "DS_NOP",                     DS_NOP,                 api_dsrole_stub },
00071         { "DS_GETPRIMDOMINFO",          DS_GETPRIMDOMINFO,      api_dsrole_get_primary_dominfo  }
00072 
00073 };
00074 
00075 void lsa_ds_get_pipe_fns( struct api_struct **fns, int *n_fns )
00076 {
00077         *fns = api_lsa_ds_cmds;
00078         *n_fns = sizeof(api_lsa_ds_cmds) / sizeof(struct api_struct);
00079 }
00080 
00081 
00082 NTSTATUS rpc_lsa_ds_init(void)
00083 {
00084         return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "lsa_ds", "lsa_ds", api_lsa_ds_cmds,
00085                 sizeof(api_lsa_ds_cmds) / sizeof(struct api_struct));
00086 }

Sambaに対してSat Aug 29 21:23:19 2009に生成されました。  doxygen 1.4.7