1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r18728: revert previous commit until I fix the wkssvc_nt.c changes

(This used to be commit 57d8519185)
This commit is contained in:
Gerald Carter 2006-09-20 18:06:02 +00:00 committed by Gerald (Jerry) Carter
parent 8a1439b10d
commit 8126f91375
6 changed files with 43 additions and 318 deletions

View File

@ -211,7 +211,7 @@ LIBNDR_OBJ = librpc/ndr/ndr_basic.o librpc/ndr/ndr.o librpc/ndr/ndr_misc.o \
LIBNDR_GEN_OBJ = librpc/gen_ndr/ndr_unixinfo.o librpc/gen_ndr/ndr_lsa.o \
librpc/gen_ndr/ndr_dfs.o librpc/gen_ndr/ndr_echo.o \
librpc/gen_ndr/ndr_winreg.o librpc/gen_ndr/ndr_initshutdown.o \
librpc/gen_ndr/ndr_eventlog.o librpc/gen_ndr/ndr_wkssvc.o
librpc/gen_ndr/ndr_eventlog.o
RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o
@ -292,6 +292,7 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \
rpc_client/cli_netlogon.o rpc_client/cli_srvsvc.o \
rpc_client/cli_wkssvc.o \
rpc_client/cli_reg.o $(RPC_CLIENT_OBJ) \
rpc_client/cli_spoolss.o rpc_client/cli_spoolss_notify.o \
rpc_client/cli_ds.o \
@ -326,7 +327,7 @@ RPC_LSA_DS_OBJ = rpc_server/srv_lsa_ds.o rpc_server/srv_lsa_ds_nt.o
RPC_SVC_OBJ = rpc_server/srv_srvsvc.o rpc_server/srv_srvsvc_nt.o
RPC_WKS_OBJ = librpc/gen_ndr/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o
RPC_WKS_OBJ = rpc_server/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o
RPC_SVCCTL_OBJ = rpc_server/srv_svcctl.o rpc_server/srv_svcctl_nt.o \
services/svc_spoolss.o services/svc_rcinit.o services/services_db.o \
@ -355,8 +356,10 @@ RPC_PARSE_OBJ1 = $(RPC_PARSE_OBJ0) rpc_parse/parse_sec.o
RPC_PARSE_OBJ = rpc_parse/parse_lsa.o rpc_parse/parse_net.o \
rpc_parse/parse_reg.o rpc_parse/parse_rpc.o \
rpc_parse/parse_samr.o rpc_parse/parse_srv.o \
rpc_parse/parse_ds.o rpc_parse/parse_spoolss.o \
rpc_parse/parse_shutdown.o rpc_parse/parse_svcctl.o \
rpc_parse/parse_wks.o rpc_parse/parse_ds.o \
rpc_parse/parse_spoolss.o \
rpc_parse/parse_shutdown.o \
rpc_parse/parse_svcctl.o \
rpc_parse/parse_eventlog.o rpc_parse/parse_buffer.o \
rpc_parse/parse_ntsvcs.o $(REGOBJS_OBJ)

View File

@ -579,7 +579,7 @@ DYNEXP=
dnl Add modules that have to be built by default here
dnl These have to be built static:
default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsa rpc_samr rpc_reg rpc_lsa_ds rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_net rpc_netdfs rpc_srv rpc_spoolss rpc_eventlog rpc_unixinfo auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin vfs_default"
default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsa rpc_samr rpc_reg rpc_lsa_ds rpc_wks rpc_svcctl rpc_ntsvcs rpc_net rpc_netdfs rpc_srv rpc_spoolss rpc_eventlog rpc_unixinfo auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin vfs_default"
dnl These are preferably build shared, and static if dlopen() is not available
default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy charset_CP850 charset_CP437 auth_script"
@ -5618,7 +5618,7 @@ SMB_SUBSYSTEM(PDB,passdb/pdb_interface.o)
SMB_MODULE(rpc_lsa, \$(RPC_LSA_OBJ), "bin/librpc_lsarpc.$SHLIBEXT", RPC)
SMB_MODULE(rpc_reg, \$(RPC_REG_OBJ), "bin/librpc_winreg.$SHLIBEXT", RPC)
SMB_MODULE(rpc_lsa_ds, \$(RPC_LSA_DS_OBJ), "bin/librpc_lsa_ds.$SHLIBEXT", RPC)
SMB_MODULE(rpc_wkssvc, \$(RPC_WKS_OBJ), "bin/librpc_wkssvc.$SHLIBEXT", RPC)
SMB_MODULE(rpc_wks, \$(RPC_WKS_OBJ), "bin/librpc_wkssvc.$SHLIBEXT", RPC)
SMB_MODULE(rpc_svcctl, \$(RPC_SVCCTL_OBJ), "bin/librpc_svcctl.$SHLIBEXT", RPC)
SMB_MODULE(rpc_ntsvcs, \$(RPC_NTSVCS_OBJ), "bin/librpc_ntsvcs.$SHLIBEXT", RPC)
SMB_MODULE(rpc_net, \$(RPC_NETLOG_OBJ), "bin/librpc_NETLOGON.$SHLIBEXT", RPC)

View File

@ -2680,8 +2680,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, int flags,
if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, r->in.level));
NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
if (r->in.resume_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@ -2691,8 +2690,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, int flags,
if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, r->out.level));
NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.totalentries));
if (r->out.totalentries) {
@ -2747,8 +2745,7 @@ NTSTATUS ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, int flags,
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, r->in.level));
NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
@ -2779,8 +2776,7 @@ NTSTATUS ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, int flags,
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, r->out.level));
NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_totalentries));
@ -2829,8 +2825,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, cons
ndr->depth--;
ndr_print_ptr(ndr, "ctr", r->in.ctr);
ndr->depth++;
if (r->in.level == NULL) return;
ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
ndr_print_set_switch_value(ndr, r->in.ctr, r->in.level);
ndr_print_wkssvc_NetWkstaTransportCtr(ndr, "ctr", r->in.ctr);
ndr->depth--;
ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
@ -2849,8 +2844,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, cons
ndr->depth--;
ndr_print_ptr(ndr, "ctr", r->out.ctr);
ndr->depth++;
if (r->out.level == NULL) return;
ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
ndr_print_set_switch_value(ndr, r->out.ctr, r->out.level);
ndr_print_wkssvc_NetWkstaTransportCtr(ndr, "ctr", r->out.ctr);
ndr->depth--;
ndr_print_ptr(ndr, "totalentries", r->out.totalentries);

View File

@ -247,14 +247,14 @@ struct wkssvc_NetWkstaTransportEnum {
struct {
const char *server_name;/* [unique,charset(UTF16)] */
uint32_t *level;/* [ref] */
union wkssvc_NetWkstaTransportCtr *ctr;/* [ref,switch_is(*level)] */
union wkssvc_NetWkstaTransportCtr *ctr;/* [ref,switch_is(level)] */
uint32_t max_buffer;
uint32_t *resume_handle;/* [ref] */
} in;
struct {
uint32_t *level;/* [ref] */
union wkssvc_NetWkstaTransportCtr *ctr;/* [ref,switch_is(*level)] */
union wkssvc_NetWkstaTransportCtr *ctr;/* [ref,switch_is(level)] */
uint32_t *totalentries;/* [unique] */
uint32_t *resume_handle;/* [ref] */
WERROR result;

View File

@ -217,7 +217,7 @@
WERROR wkssvc_NetWkstaTransportEnum (
[in] [string,charset(UTF16)] uint16 *server_name,
[in,out,ref] uint32 *level,
[in,out,switch_is(*level),ref] wkssvc_NetWkstaTransportCtr *ctr,
[in,out,switch_is(level),ref] wkssvc_NetWkstaTransportCtr *ctr,
[in] uint32 max_buffer,
[out] uint32 *totalentries,
[in,out,ref] uint32 *resume_handle

View File

@ -29,323 +29,51 @@
#define DBGC_CLASS DBGC_RPC_SRV
/*******************************************************************
Fill in the valiues for the struct wkssvc_NetWkstaInfo100.
create_wks_info_100
********************************************************************/
static void create_wks_info_100(struct wkssvc_NetWkstaInfo100 *info100)
static void create_wks_info_100(WKS_INFO_100 *inf)
{
pstring my_name;
pstring domain;
DEBUG(5,("create_wks_info_100: %d\n", __LINE__));
pstrcpy (my_name, global_myname());
strupper_m(my_name);
pstrcpy (domain, lp_workgroup());
strupper_m(domain);
info100->platform_id = 0x000001f4; /* unknown */
info100->version_major = lp_major_announce_version();
info100->version_minor = lp_minor_announce_version();
info100->server_name = talloc_strdup( info100, my_name );
info100->domain_name = talloc_strdup( info100, domain );
return;
init_wks_info_100(inf,
0x000001f4, /* platform id info */
lp_major_announce_version(),
lp_minor_announce_version(),
my_name, domain);
}
/********************************************************************
/*******************************************************************
wks_reply_query_info
only supports info level 100 at the moment.
********************************************************************/
WERROR _wkssvc_NetWkstaGetInfo( pipes_struct *p, const char *server_name, uint32_t level,
union wkssvc_NetWkstaInfo *info )
NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u)
{
struct wkssvc_NetWkstaInfo100 *wks100 = NULL;
/* We only support info level 100 currently */
if ( level != 100 ) {
return NT_STATUS_INVALID_LEVEL;
}
WKS_INFO_100 *wks100 = NULL;
if ( (wks100 = TALLOC_ZERO_P(p->mem_ctx, struct wkssvc_NetWkstaInfo100)) == NULL ) {
DEBUG(5,("_wks_query_info: %d\n", __LINE__));
wks100 = TALLOC_ZERO_P(p->mem_ctx, WKS_INFO_100);
if (!wks100)
return NT_STATUS_NO_MEMORY;
}
create_wks_info_100( wks100 );
info->info100 = wks100;
create_wks_info_100(wks100);
init_wks_r_query_info(r_u, q_u->switch_value, wks100, NT_STATUS_OK);
return NT_STATUS_OK;
DEBUG(5,("_wks_query_info: %d\n", __LINE__));
return r_u->status;
}
/********************************************************************
********************************************************************/
WERROR _wkssvc_NetWkstaSetInfo( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _wkssvc_NetWkstaEnumUsers( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRWKSTAUSERGETINFO( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRWKSTAUSERSETINFO( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _wkssvc_NetWkstaTransportEnum( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRWKSTATRANSPORTADD( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRWKSTATRANSPORTDEL( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRUSEADD( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRUSEGETINFO( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRUSEDEL( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRUSEENUM( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRMESSAGEBUFFERSEND( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRWORKSTATIONSTATISTICSGET( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRLOGONDOMAINNAMEADD( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRLOGONDOMAINNAMEDEL( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRJOINDOMAIN( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRUNJOINDOMAIN( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRRENAMEMACHINEINDOMAIN( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRVALIDATENAME( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRGETJOININFORMATION( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRGETJOINABLEOUS( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _wkssvc_NetrJoinDomain2( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _wkssvc_NetrUnjoinDomain2( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _wkssvc_NetrRenameMachineInDomain2( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRVALIDATENAME2( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRGETJOINABLEOUS2( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _wkssvc_NetrAddAlternateComputerName( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _wkssvc_NetrRemoveAlternateComputerName( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRSETPRIMARYCOMPUTERNAME( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}
/********************************************************************
********************************************************************/
WERROR _WKSSVC_NETRENUMERATECOMPUTERNAMES( pipes_struct *p )
{
/* FIXME: Add implementation code here */
return WERR_NOT_SUPPORTED;
}