rpc_server/srv_wkssvc_nt.c

説明を見る。
00001 /* 
00002  *  Unix SMB/CIFS implementation.
00003  *  RPC Pipe client / server routines
00004  *
00005  *  Copyright (C) Andrew Tridgell               1992-1997,
00006  *  Copyright (C) Gerald (Jerry) Carter         2006.
00007  *  
00008  *  This program is free software; you can redistribute it and/or modify
00009  *  it under the terms of the GNU General Public License as published by
00010  *  the Free Software Foundation; either version 2 of the License, or
00011  *  (at your option) any later version.
00012  *  
00013  *  This program is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  *  GNU General Public License for more details.
00017  *  
00018  *  You should have received a copy of the GNU General Public License
00019  *  along with this program; if not, write to the Free Software
00020  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00021  */
00022 
00023 /* This is the implementation of the wks interface. */
00024 
00025 #include "includes.h"
00026 
00027 #undef DBGC_CLASS
00028 #define DBGC_CLASS DBGC_RPC_SRV
00029 
00030 /*******************************************************************
00031  Fill in the valiues for the struct wkssvc_NetWkstaInfo100.
00032  ********************************************************************/
00033 
00034 static void create_wks_info_100(struct wkssvc_NetWkstaInfo100 *info100)
00035 {
00036         pstring my_name;
00037         pstring domain;
00038 
00039         pstrcpy (my_name, global_myname());
00040         strupper_m(my_name);
00041 
00042         pstrcpy (domain, lp_workgroup());
00043         strupper_m(domain);
00044         
00045         info100->platform_id     = 0x000001f4;  /* unknown */
00046         info100->version_major   = lp_major_announce_version(); 
00047         info100->version_minor   = lp_minor_announce_version();   
00048 
00049         info100->server_name = talloc_strdup( info100, my_name );
00050         info100->domain_name = talloc_strdup( info100, domain );
00051 
00052         return;
00053 }
00054 
00055 /********************************************************************
00056  only supports info level 100 at the moment.
00057  ********************************************************************/
00058 
00059 WERROR _wkssvc_NetWkstaGetInfo( pipes_struct *p, struct wkssvc_NetWkstaGetInfo *r)
00060 {
00061         struct wkssvc_NetWkstaInfo100 *wks100 = NULL;
00062         
00063         /* We only support info level 100 currently */
00064         
00065         if ( r->in.level != 100 ) {
00066                 return WERR_UNKNOWN_LEVEL;
00067         }
00068 
00069         if ( (wks100 = TALLOC_ZERO_P(p->mem_ctx, struct wkssvc_NetWkstaInfo100)) == NULL ) {
00070                 return WERR_NOMEM;
00071         }
00072 
00073         create_wks_info_100( wks100 );
00074         
00075         r->out.info->info100 = wks100;
00076 
00077         return WERR_OK;
00078 }
00079 
00080 /********************************************************************
00081  ********************************************************************/
00082 
00083 WERROR _wkssvc_NetWkstaSetInfo( pipes_struct *p, struct wkssvc_NetWkstaSetInfo *r)
00084 {
00085         /* FIXME: Add implementation code here */
00086         p->rng_fault_state = True;
00087         return WERR_NOT_SUPPORTED;
00088 }
00089 
00090 /********************************************************************
00091  ********************************************************************/
00092 
00093 WERROR _wkssvc_NetWkstaEnumUsers( pipes_struct *p, struct wkssvc_NetWkstaEnumUsers *r)
00094 {
00095         /* FIXME: Add implementation code here */
00096         p->rng_fault_state = True;
00097         return WERR_NOT_SUPPORTED;
00098 }
00099 
00100 /********************************************************************
00101  ********************************************************************/
00102 
00103 WERROR _WKSSVC_NETRWKSTAUSERGETINFO( pipes_struct *p, struct WKSSVC_NETRWKSTAUSERGETINFO *r )
00104 {
00105         /* FIXME: Add implementation code here */
00106         p->rng_fault_state = True;
00107         return WERR_NOT_SUPPORTED;
00108 }
00109 
00110 /********************************************************************
00111  ********************************************************************/
00112 
00113 WERROR _WKSSVC_NETRWKSTAUSERSETINFO( pipes_struct *p, struct WKSSVC_NETRWKSTAUSERSETINFO *r )
00114 {
00115         /* FIXME: Add implementation code here */
00116         p->rng_fault_state = True;
00117         return WERR_NOT_SUPPORTED;
00118 }
00119 
00120 /********************************************************************
00121  ********************************************************************/
00122 
00123 WERROR _wkssvc_NetWkstaTransportEnum( pipes_struct *p, struct wkssvc_NetWkstaTransportEnum *r)
00124 {
00125         /* FIXME: Add implementation code here */
00126         p->rng_fault_state = True;
00127         return WERR_NOT_SUPPORTED;
00128 }
00129 
00130 /********************************************************************
00131  ********************************************************************/
00132 
00133 WERROR _WKSSVC_NETRWKSTATRANSPORTADD( pipes_struct *p, struct WKSSVC_NETRWKSTATRANSPORTADD *r )
00134 {
00135         /* FIXME: Add implementation code here */
00136         p->rng_fault_state = True;
00137         return WERR_NOT_SUPPORTED;
00138 }
00139 
00140 /********************************************************************
00141  ********************************************************************/
00142 
00143 WERROR _WKSSVC_NETRWKSTATRANSPORTDEL( pipes_struct *p, struct WKSSVC_NETRWKSTATRANSPORTDEL *r )
00144 {
00145         /* FIXME: Add implementation code here */
00146         p->rng_fault_state = True;
00147         return WERR_NOT_SUPPORTED;
00148 }
00149 
00150 /********************************************************************
00151  ********************************************************************/
00152 
00153 WERROR _WKSSVC_NETRUSEADD( pipes_struct *p, struct WKSSVC_NETRUSEADD *r )
00154 {
00155         /* FIXME: Add implementation code here */
00156         p->rng_fault_state = True;
00157         return WERR_NOT_SUPPORTED;
00158 }
00159 
00160 /********************************************************************
00161  ********************************************************************/
00162 
00163 WERROR _WKSSVC_NETRUSEGETINFO( pipes_struct *p, struct WKSSVC_NETRUSEGETINFO *r )
00164 {
00165         /* FIXME: Add implementation code here */
00166         p->rng_fault_state = True;
00167         return WERR_NOT_SUPPORTED;
00168 }
00169 
00170 /********************************************************************
00171  ********************************************************************/
00172 
00173 WERROR _WKSSVC_NETRUSEDEL( pipes_struct *p, struct WKSSVC_NETRUSEDEL *r )
00174 {
00175         /* FIXME: Add implementation code here */
00176         p->rng_fault_state = True;
00177         return WERR_NOT_SUPPORTED;
00178 }
00179 
00180 /********************************************************************
00181  ********************************************************************/
00182 
00183 WERROR _WKSSVC_NETRUSEENUM( pipes_struct *p, struct WKSSVC_NETRUSEENUM *r )
00184 {
00185         /* FIXME: Add implementation code here */
00186         p->rng_fault_state = True;
00187         return WERR_NOT_SUPPORTED;
00188 }
00189 
00190 /********************************************************************
00191  ********************************************************************/
00192 
00193 WERROR _WKSSVC_NETRMESSAGEBUFFERSEND( pipes_struct *p, struct WKSSVC_NETRMESSAGEBUFFERSEND *r )
00194 {
00195         /* FIXME: Add implementation code here */
00196         p->rng_fault_state = True;
00197         return WERR_NOT_SUPPORTED;
00198 }
00199 
00200 /********************************************************************
00201  ********************************************************************/
00202 
00203 WERROR _WKSSVC_NETRWORKSTATIONSTATISTICSGET( pipes_struct *p, struct WKSSVC_NETRWORKSTATIONSTATISTICSGET *r )
00204 {
00205         /* FIXME: Add implementation code here */
00206         p->rng_fault_state = True;
00207         return WERR_NOT_SUPPORTED;
00208 }
00209 
00210 /********************************************************************
00211  ********************************************************************/
00212 
00213 WERROR _WKSSVC_NETRLOGONDOMAINNAMEADD( pipes_struct *p, struct WKSSVC_NETRLOGONDOMAINNAMEADD *r )
00214 {
00215         /* FIXME: Add implementation code here */
00216         p->rng_fault_state = True;
00217         return WERR_NOT_SUPPORTED;
00218 }
00219 
00220 /********************************************************************
00221  ********************************************************************/
00222 
00223 WERROR _WKSSVC_NETRLOGONDOMAINNAMEDEL( pipes_struct *p, struct WKSSVC_NETRLOGONDOMAINNAMEDEL *r )
00224 {
00225         /* FIXME: Add implementation code here */
00226         p->rng_fault_state = True;
00227         return WERR_NOT_SUPPORTED;
00228 }
00229 
00230 /********************************************************************
00231  ********************************************************************/
00232 
00233 WERROR _WKSSVC_NETRJOINDOMAIN( pipes_struct *p, struct WKSSVC_NETRJOINDOMAIN *r )
00234 {
00235         /* FIXME: Add implementation code here */
00236         p->rng_fault_state = True;
00237         return WERR_NOT_SUPPORTED;
00238 }
00239 
00240 /********************************************************************
00241  ********************************************************************/
00242 
00243 WERROR _WKSSVC_NETRUNJOINDOMAIN( pipes_struct *p, struct WKSSVC_NETRUNJOINDOMAIN *r )
00244 {
00245         /* FIXME: Add implementation code here */
00246         p->rng_fault_state = True;
00247         return WERR_NOT_SUPPORTED;
00248 }
00249 
00250 /********************************************************************
00251  ********************************************************************/
00252 
00253 WERROR _WKSSVC_NETRRENAMEMACHINEINDOMAIN( pipes_struct *p, struct WKSSVC_NETRRENAMEMACHINEINDOMAIN *r )
00254 {
00255         /* FIXME: Add implementation code here */
00256         p->rng_fault_state = True;
00257         return WERR_NOT_SUPPORTED;
00258 }
00259 
00260 /********************************************************************
00261  ********************************************************************/
00262 
00263 WERROR _WKSSVC_NETRVALIDATENAME( pipes_struct *p, struct WKSSVC_NETRVALIDATENAME *r )
00264 {
00265         /* FIXME: Add implementation code here */
00266         p->rng_fault_state = True;
00267         return WERR_NOT_SUPPORTED;
00268 }
00269 
00270 /********************************************************************
00271  ********************************************************************/
00272 
00273 WERROR _WKSSVC_NETRGETJOININFORMATION( pipes_struct *p, struct WKSSVC_NETRGETJOININFORMATION *r )
00274 {
00275         /* FIXME: Add implementation code here */
00276         p->rng_fault_state = True;
00277         return WERR_NOT_SUPPORTED;
00278 }
00279 
00280 /********************************************************************
00281  ********************************************************************/
00282 
00283 WERROR _WKSSVC_NETRGETJOINABLEOUS( pipes_struct *p, struct WKSSVC_NETRGETJOINABLEOUS *r )
00284 {
00285         /* FIXME: Add implementation code here */
00286         p->rng_fault_state = True;
00287         return WERR_NOT_SUPPORTED;
00288 }
00289 
00290 /********************************************************************
00291  ********************************************************************/
00292 
00293 WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p, struct wkssvc_NetrJoinDomain2 *r)
00294 {
00295         /* FIXME: Add implementation code here */
00296         p->rng_fault_state = True;
00297         return WERR_NOT_SUPPORTED;
00298 }
00299 
00300 /********************************************************************
00301  ********************************************************************/
00302 
00303 WERROR _wkssvc_NetrUnjoinDomain2(pipes_struct *p, struct wkssvc_NetrUnjoinDomain2 *r)
00304 {
00305         /* FIXME: Add implementation code here */
00306         p->rng_fault_state = True;
00307         return WERR_NOT_SUPPORTED;
00308 }
00309 
00310 /********************************************************************
00311  ********************************************************************/
00312 
00313 WERROR _wkssvc_NetrRenameMachineInDomain2(pipes_struct *p, struct wkssvc_NetrRenameMachineInDomain2 *r)
00314 {
00315         /* FIXME: Add implementation code here */
00316         p->rng_fault_state = True;
00317         return WERR_NOT_SUPPORTED;
00318 }
00319 
00320 /********************************************************************
00321  ********************************************************************/
00322 
00323 WERROR _WKSSVC_NETRVALIDATENAME2( pipes_struct *p, struct WKSSVC_NETRVALIDATENAME2 *r )
00324 {
00325         /* FIXME: Add implementation code here */
00326         p->rng_fault_state = True;
00327         return WERR_NOT_SUPPORTED;
00328 }
00329 
00330 /********************************************************************
00331  ********************************************************************/
00332 
00333 WERROR _WKSSVC_NETRGETJOINABLEOUS2( pipes_struct *p, struct WKSSVC_NETRGETJOINABLEOUS2 *r )
00334 {
00335         /* FIXME: Add implementation code here */
00336         p->rng_fault_state = True;
00337         return WERR_NOT_SUPPORTED;
00338 }
00339 
00340 /********************************************************************
00341  ********************************************************************/
00342 
00343 WERROR _wkssvc_NetrAddAlternateComputerName(pipes_struct *p, struct wkssvc_NetrAddAlternateComputerName *r )
00344 {
00345         /* FIXME: Add implementation code here */
00346         p->rng_fault_state = True;
00347         return WERR_NOT_SUPPORTED;
00348 }
00349 
00350 /********************************************************************
00351  ********************************************************************/
00352 
00353 WERROR _wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p, struct wkssvc_NetrRemoveAlternateComputerName *r)
00354 {
00355         /* FIXME: Add implementation code here */
00356         p->rng_fault_state = True;
00357         return WERR_NOT_SUPPORTED;
00358 }
00359 
00360 /********************************************************************
00361  ********************************************************************/
00362 
00363 WERROR _WKSSVC_NETRSETPRIMARYCOMPUTERNAME( pipes_struct *p, struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME *r )
00364 {
00365         /* FIXME: Add implementation code here */
00366         p->rng_fault_state = True;
00367         return WERR_NOT_SUPPORTED;
00368 }
00369 
00370 /********************************************************************
00371  ********************************************************************/
00372 
00373 WERROR _WKSSVC_NETRENUMERATECOMPUTERNAMES( pipes_struct *p, struct WKSSVC_NETRENUMERATECOMPUTERNAMES *r )
00374 {
00375         /* FIXME: Add implementation code here */
00376         p->rng_fault_state = True;
00377         return WERR_NOT_SUPPORTED;
00378 }
00379 

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