#include "rpc_server/dcerpc_server.h"
#include "librpc/gen_ndr/ndr_srvsvc.h"
#include "rpc_server/common/common.h"
-#include "rpc_server/common/proto.h"
#include "auth/auth.h"
#include "libcli/security/security.h"
#include "system/time.h"
#define SRVSVC_CHECK_ADMIN_ACCESS do { \
struct security_token *t = dce_call->conn->auth_state.session_info->security_token; \
if (!security_token_has_builtin_administrators(t) && \
- !security_token_has_sid_string(t, SID_BUILTIN_SERVER_OPERATORS)) { \
+ !security_token_has_sid(t, &global_sid_Builtin_Server_Operators)) { \
return WERR_ACCESS_DENIED; \
} \
} while (0)
static WERROR dcesrv_srvsvc_NetCharDevEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetCharDevEnum *r)
{
- r->out.level = r->in.level;
- r->out.totalentries = 0;
- r->out.resume_handle = NULL;
+ *r->out.totalentries = 0;
- switch (r->in.level) {
+ switch (r->in.info_ctr->level) {
case 0:
- r->out.ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetCharDevCtr0);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr0);
+ r->out.info_ctr->ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetCharDevCtr0);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr0);
- r->out.ctr.ctr0->count = 0;
- r->out.ctr.ctr0->array = NULL;
+ r->out.info_ctr->ctr.ctr0->count = 0;
+ r->out.info_ctr->ctr.ctr0->array = NULL;
return WERR_NOT_SUPPORTED;
case 1:
- r->out.ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetCharDevCtr1);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr1);
+ r->out.info_ctr->ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetCharDevCtr1);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr1);
- r->out.ctr.ctr1->count = 0;
- r->out.ctr.ctr1->array = NULL;
+ r->out.info_ctr->ctr.ctr1->count = 0;
+ r->out.info_ctr->ctr.ctr1->array = NULL;
return WERR_NOT_SUPPORTED;
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_OK;
}
static WERROR dcesrv_srvsvc_NetCharDevGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetCharDevGetInfo *r)
{
- ZERO_STRUCT(r->out);
+ ZERO_STRUCTP(r->out.info);
switch (r->in.level) {
case 0:
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
static WERROR dcesrv_srvsvc_NetCharDevQEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetCharDevQEnum *r)
{
- r->out.level = r->in.level;
- r->out.totalentries = 0;
- r->out.resume_handle = NULL;
+ *r->out.totalentries = 0;
- switch (r->in.level) {
+ switch (r->in.info_ctr->level) {
case 0:
{
- r->out.ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetCharDevQCtr0);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr0);
+ r->out.info_ctr->ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetCharDevQCtr0);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr0);
- r->out.ctr.ctr0->count = 0;
- r->out.ctr.ctr0->array = NULL;
+ r->out.info_ctr->ctr.ctr0->count = 0;
+ r->out.info_ctr->ctr.ctr0->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 1:
{
- r->out.ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetCharDevQCtr1);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr1);
+ r->out.info_ctr->ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetCharDevQCtr1);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr1);
- r->out.ctr.ctr1->count = 0;
- r->out.ctr.ctr1->array = NULL;
+ r->out.info_ctr->ctr.ctr1->count = 0;
+ r->out.info_ctr->ctr.ctr1->array = NULL;
return WERR_NOT_SUPPORTED;
}
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
static WERROR dcesrv_srvsvc_NetCharDevQGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetCharDevQGetInfo *r)
{
- ZERO_STRUCT(r->out);
+ ZERO_STRUCTP(r->out.info);
switch (r->in.level) {
case 0:
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
static WERROR dcesrv_srvsvc_NetConnEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetConnEnum *r)
{
- r->out.level = r->in.level;
- r->out.totalentries = 0;
- r->out.resume_handle = NULL;
+ *r->out.totalentries = 0;
- switch (r->in.level) {
+ switch (r->in.info_ctr->level) {
case 0:
{
- r->out.ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetConnCtr0);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr0);
+ r->out.info_ctr->ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetConnCtr0);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr0);
- r->out.ctr.ctr0->count = 0;
- r->out.ctr.ctr0->array = NULL;
+ r->out.info_ctr->ctr.ctr0->count = 0;
+ r->out.info_ctr->ctr.ctr0->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 1:
{
- r->out.ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetConnCtr1);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr1);
+ r->out.info_ctr->ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetConnCtr1);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr1);
- r->out.ctr.ctr1->count = 0;
- r->out.ctr.ctr1->array = NULL;
+ r->out.info_ctr->ctr.ctr1->count = 0;
+ r->out.info_ctr->ctr.ctr1->array = NULL;
return WERR_NOT_SUPPORTED;
}
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
static WERROR dcesrv_srvsvc_NetFileEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetFileEnum *r)
{
- r->out.level = r->in.level;
- r->out.totalentries = 0;
- r->out.resume_handle = NULL;
+ *r->out.totalentries = 0;
- switch (r->in.level) {
+ switch (r->in.info_ctr->level) {
case 2:
{
- r->out.ctr.ctr2 = talloc(mem_ctx, struct srvsvc_NetFileCtr2);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr2);
+ r->out.info_ctr->ctr.ctr2 = talloc(mem_ctx, struct srvsvc_NetFileCtr2);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr2);
- r->out.ctr.ctr2->count = 0;
- r->out.ctr.ctr2->array = NULL;
+ r->out.info_ctr->ctr.ctr2->count = 0;
+ r->out.info_ctr->ctr.ctr2->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 3:
{
- r->out.ctr.ctr3 = talloc(mem_ctx, struct srvsvc_NetFileCtr3);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr3);
+ r->out.info_ctr->ctr.ctr3 = talloc(mem_ctx, struct srvsvc_NetFileCtr3);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr3);
- r->out.ctr.ctr3->count = 0;
- r->out.ctr.ctr3->array = NULL;
+ r->out.info_ctr->ctr.ctr3->count = 0;
+ r->out.info_ctr->ctr.ctr3->array = NULL;
return WERR_NOT_SUPPORTED;
}
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
static WERROR dcesrv_srvsvc_NetFileGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetFileGetInfo *r)
{
- ZERO_STRUCT(r->out);
+ ZERO_STRUCTP(r->out.info);
switch (r->in.level) {
case 2:
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
static WERROR dcesrv_srvsvc_NetSessEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetSessEnum *r)
{
- r->out.level = r->in.level;
- r->out.totalentries = 0;
- r->out.resume_handle = NULL;
+ *r->out.totalentries = 0;
- switch (r->in.level) {
+ switch (r->in.info_ctr->level) {
case 0:
{
- r->out.ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetSessCtr0);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr0);
+ r->out.info_ctr->ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetSessCtr0);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr0);
- r->out.ctr.ctr0->count = 0;
- r->out.ctr.ctr0->array = NULL;
+ r->out.info_ctr->ctr.ctr0->count = 0;
+ r->out.info_ctr->ctr.ctr0->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 1:
{
- r->out.ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetSessCtr1);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr1);
+ r->out.info_ctr->ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetSessCtr1);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr1);
- r->out.ctr.ctr1->count = 0;
- r->out.ctr.ctr1->array = NULL;
+ r->out.info_ctr->ctr.ctr1->count = 0;
+ r->out.info_ctr->ctr.ctr1->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 2:
{
- r->out.ctr.ctr2 = talloc(mem_ctx, struct srvsvc_NetSessCtr2);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr2);
+ r->out.info_ctr->ctr.ctr2 = talloc(mem_ctx, struct srvsvc_NetSessCtr2);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr2);
- r->out.ctr.ctr2->count = 0;
- r->out.ctr.ctr2->array = NULL;
+ r->out.info_ctr->ctr.ctr2->count = 0;
+ r->out.info_ctr->ctr.ctr2->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 10:
{
- r->out.ctr.ctr10 = talloc(mem_ctx, struct srvsvc_NetSessCtr10);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr10);
+ r->out.info_ctr->ctr.ctr10 = talloc(mem_ctx, struct srvsvc_NetSessCtr10);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr10);
- r->out.ctr.ctr2->count = 0;
- r->out.ctr.ctr2->array = NULL;
+ r->out.info_ctr->ctr.ctr10->count = 0;
+ r->out.info_ctr->ctr.ctr10->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 502:
{
- r->out.ctr.ctr502 = talloc(mem_ctx, struct srvsvc_NetSessCtr502);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr502);
+ r->out.info_ctr->ctr.ctr502 = talloc(mem_ctx, struct srvsvc_NetSessCtr502);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr502);
- r->out.ctr.ctr2->count = 0;
- r->out.ctr.ctr2->array = NULL;
+ r->out.info_ctr->ctr.ctr502->count = 0;
+ r->out.info_ctr->ctr.ctr502->array = NULL;
return WERR_NOT_SUPPORTED;
}
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
NTSTATUS nterr;
struct share_info *info;
struct share_context *sctx;
- int count = 8;
- int i;
+ unsigned int count = 8;
+ unsigned int i;
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lpcfg_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
info[i].name = SHARE_TYPE;
info[i].type = SHARE_INFO_STRING;
- switch (r->in.info.info2->type) {
+ switch (r->in.info->info2->type) {
case 0x00:
info[i].value = talloc_strdup(info, "DISK");
break;
W_ERROR_HAVE_NO_MEMORY(info[i].value);
i++;
- if (r->in.info.info2->path && r->in.info.info2->path[0]) {
+ if (r->in.info->info2->path && r->in.info->info2->path[0]) {
info[i].name = SHARE_PATH;
info[i].type = SHARE_INFO_STRING;
/* Windows will send a path in a form of C:\example\path */
- if (r->in.info.info2->path[1] == ':') {
- info[i].value = talloc_strdup(info, &r->in.info.info2->path[2]);
+ if (r->in.info->info2->path[1] == ':') {
+ info[i].value = talloc_strdup(info, &r->in.info->info2->path[2]);
} else {
/* very strange let's try to set as is */
- info[i].value = talloc_strdup(info, r->in.info.info2->path);
+ info[i].value = talloc_strdup(info, r->in.info->info2->path);
}
W_ERROR_HAVE_NO_MEMORY(info[i].value);
all_string_sub((char *)info[i].value, "\\", "/", 0);
i++;
}
- if (r->in.info.info2->comment && r->in.info.info2->comment[0]) {
+ if (r->in.info->info2->comment && r->in.info->info2->comment[0]) {
info[i].name = SHARE_COMMENT;
info[i].type = SHARE_INFO_STRING;
- info[i].value = talloc_strdup(info, r->in.info.info2->comment);
+ info[i].value = talloc_strdup(info, r->in.info->info2->comment);
W_ERROR_HAVE_NO_MEMORY(info[i].value);
i++;
}
- if (r->in.info.info2->password && r->in.info.info2->password[0]) {
+ if (r->in.info->info2->password && r->in.info->info2->password[0]) {
info[i].name = SHARE_PASSWORD;
info[i].type = SHARE_INFO_STRING;
- info[i].value = talloc_strdup(info, r->in.info.info2->password);
+ info[i].value = talloc_strdup(info, r->in.info->info2->password);
W_ERROR_HAVE_NO_MEMORY(info[i].value);
i++;
info[i].name = SHARE_MAX_CONNECTIONS;
info[i].type = SHARE_INFO_INT;
info[i].value = talloc(info, int);
- *((int *)info[i].value) = r->in.info.info2->max_users;
+ *((int *)info[i].value) = r->in.info->info2->max_users;
i++;
/* TODO: security descriptor */
- nterr = share_create(sctx, r->in.info.info2->name, info, i);
+ nterr = share_create(sctx, r->in.info->info2->name, info, i);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
NTSTATUS nterr;
struct share_info *info;
struct share_context *sctx;
- int count = 10;
- int i;
+ unsigned int count = 10;
+ unsigned int i;
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lpcfg_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
info[i].name = SHARE_TYPE;
info[i].type = SHARE_INFO_STRING;
- switch (r->in.info.info502->type) {
+ switch (r->in.info->info502->type) {
case 0x00:
info[i].value = talloc_strdup(info, "DISK");
break;
W_ERROR_HAVE_NO_MEMORY(info[i].value);
i++;
- if (r->in.info.info502->path && r->in.info.info502->path[0]) {
+ if (r->in.info->info502->path && r->in.info->info502->path[0]) {
info[i].name = SHARE_PATH;
info[i].type = SHARE_INFO_STRING;
/* Windows will send a path in a form of C:\example\path */
- if (r->in.info.info502->path[1] == ':') {
- info[i].value = talloc_strdup(info, &r->in.info.info502->path[2]);
+ if (r->in.info->info502->path[1] == ':') {
+ info[i].value = talloc_strdup(info, &r->in.info->info502->path[2]);
} else {
/* very strange let's try to set as is */
- info[i].value = talloc_strdup(info, r->in.info.info502->path);
+ info[i].value = talloc_strdup(info, r->in.info->info502->path);
}
W_ERROR_HAVE_NO_MEMORY(info[i].value);
all_string_sub((char *)info[i].value, "\\", "/", 0);
i++;
}
- if (r->in.info.info502->comment && r->in.info.info502->comment[0]) {
+ if (r->in.info->info502->comment && r->in.info->info502->comment[0]) {
info[i].name = SHARE_COMMENT;
info[i].type = SHARE_INFO_STRING;
- info[i].value = talloc_strdup(info, r->in.info.info502->comment);
+ info[i].value = talloc_strdup(info, r->in.info->info502->comment);
W_ERROR_HAVE_NO_MEMORY(info[i].value);
i++;
}
- if (r->in.info.info502->password && r->in.info.info502->password[0]) {
+ if (r->in.info->info502->password && r->in.info->info502->password[0]) {
info[i].name = SHARE_PASSWORD;
info[i].type = SHARE_INFO_STRING;
- info[i].value = talloc_strdup(info, r->in.info.info502->password);
+ info[i].value = talloc_strdup(info, r->in.info->info502->password);
W_ERROR_HAVE_NO_MEMORY(info[i].value);
i++;
info[i].name = SHARE_MAX_CONNECTIONS;
info[i].type = SHARE_INFO_INT;
info[i].value = talloc(info, int);
- *((int *)info[i].value) = r->in.info.info502->max_users;
+ *((int *)info[i].value) = r->in.info->info502->max_users;
i++;
/* TODO: security descriptor */
- nterr = share_create(sctx, r->in.info.info502->name, info, i);
+ nterr = share_create(sctx, r->in.info->info502->name, info, i);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
static WERROR dcesrv_srvsvc_fiel_ShareInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
/*
struct share_context *sctx;
struct share_config *scfg;
- r->out.level = r->in.level;
- ZERO_STRUCT(r->out.ctr);
- r->out.totalentries = 0;
- r->out.resume_handle = NULL;
+ *r->out.totalentries = 0;
/* TODO: - paging of results
*/
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lpcfg_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
return ntstatus_to_werror(nterr);
}
- switch (r->in.level) {
+ switch (r->in.info_ctr->level) {
case 0:
{
- int i;
+ unsigned int i;
struct srvsvc_NetShareCtr0 *ctr0;
ctr0 = talloc(mem_ctx, struct srvsvc_NetShareCtr0);
ctr0->array = NULL;
if (ctr0->count == 0) {
- r->out.ctr.ctr0 = ctr0;
+ r->out.info_ctr->ctr.ctr0 = ctr0;
return WERR_OK;
}
return WERR_GENERAL_FAILURE;
}
info.info0 = &ctr0->array[i];
- status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.level, &info);
+ status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.info_ctr->level, &info);
if (!W_ERROR_IS_OK(status)) {
return status;
}
}
talloc_free(snames);
- r->out.ctr.ctr0 = ctr0;
- r->out.totalentries = r->out.ctr.ctr0->count;
+ r->out.info_ctr->ctr.ctr0 = ctr0;
+ *r->out.totalentries = r->out.info_ctr->ctr.ctr0->count;
return WERR_OK;
}
case 1:
{
- int i;
+ unsigned int i;
struct srvsvc_NetShareCtr1 *ctr1;
ctr1 = talloc(mem_ctx, struct srvsvc_NetShareCtr1);
ctr1->array = NULL;
if (ctr1->count == 0) {
- r->out.ctr.ctr1 = ctr1;
+ r->out.info_ctr->ctr.ctr1 = ctr1;
return WERR_OK;
}
return WERR_GENERAL_FAILURE;
}
info.info1 = &ctr1->array[i];
- status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.level, &info);
+ status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.info_ctr->level, &info);
if (!W_ERROR_IS_OK(status)) {
return status;
}
}
talloc_free(snames);
- r->out.ctr.ctr1 = ctr1;
- r->out.totalentries = r->out.ctr.ctr1->count;
+ r->out.info_ctr->ctr.ctr1 = ctr1;
+ *r->out.totalentries = r->out.info_ctr->ctr.ctr1->count;
+
return WERR_OK;
}
case 2:
{
- int i;
+ unsigned int i;
struct srvsvc_NetShareCtr2 *ctr2;
SRVSVC_CHECK_ADMIN_ACCESS;
ctr2->array = NULL;
if (ctr2->count == 0) {
- r->out.ctr.ctr2 = ctr2;
+ r->out.info_ctr->ctr.ctr2 = ctr2;
return WERR_OK;
}
return WERR_GENERAL_FAILURE;
}
info.info2 = &ctr2->array[i];
- status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.level, &info);
+ status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.info_ctr->level, &info);
if (!W_ERROR_IS_OK(status)) {
return status;
}
}
talloc_free(snames);
- r->out.ctr.ctr2 = ctr2;
- r->out.totalentries = r->out.ctr.ctr2->count;
+ r->out.info_ctr->ctr.ctr2 = ctr2;
+ *r->out.totalentries = r->out.info_ctr->ctr.ctr2->count;
+
return WERR_OK;
}
case 501:
{
- int i;
+ unsigned int i;
struct srvsvc_NetShareCtr501 *ctr501;
SRVSVC_CHECK_ADMIN_ACCESS;
ctr501->array = NULL;
if (ctr501->count == 0) {
- r->out.ctr.ctr501 = ctr501;
+ r->out.info_ctr->ctr.ctr501 = ctr501;
return WERR_OK;
}
return WERR_GENERAL_FAILURE;
}
info.info501 = &ctr501->array[i];
- status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.level, &info);
+ status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.info_ctr->level, &info);
if (!W_ERROR_IS_OK(status)) {
return status;
}
}
talloc_free(snames);
- r->out.ctr.ctr501 = ctr501;
- r->out.totalentries = r->out.ctr.ctr501->count;
+ r->out.info_ctr->ctr.ctr501 = ctr501;
+ *r->out.totalentries = r->out.info_ctr->ctr.ctr501->count;
+
return WERR_OK;
}
case 502:
{
- int i;
+ unsigned int i;
struct srvsvc_NetShareCtr502 *ctr502;
SRVSVC_CHECK_ADMIN_ACCESS;
ctr502->array = NULL;
if (ctr502->count == 0) {
- r->out.ctr.ctr502 = ctr502;
+ r->out.info_ctr->ctr.ctr502 = ctr502;
return WERR_OK;
}
return WERR_GENERAL_FAILURE;
}
info.info502 = &ctr502->array[i];
- status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.level, &info);
+ status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.info_ctr->level, &info);
if (!W_ERROR_IS_OK(status)) {
return status;
}
}
talloc_free(snames);
- r->out.ctr.ctr502 = ctr502;
- r->out.totalentries = r->out.ctr.ctr502->count;
+ r->out.info_ctr->ctr.ctr502 = ctr502;
+ *r->out.totalentries = r->out.info_ctr->ctr.ctr502->count;
+
return WERR_OK;
}
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
struct share_context *sctx = NULL;
struct share_config *scfg = NULL;
- ZERO_STRUCT(r->out);
+ ZERO_STRUCTP(r->out.info);
/* TODO: - access check
*/
return WERR_INVALID_PARAM;
}
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lpcfg_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
return status;
}
- r->out.info.info0 = info.info0;
+ r->out.info->info0 = info.info0;
return WERR_OK;
}
case 1:
return status;
}
- r->out.info.info1 = info.info1;
+ r->out.info->info1 = info.info1;
return WERR_OK;
}
case 2:
return status;
}
- r->out.info.info2 = info.info2;
+ r->out.info->info2 = info.info2;
return WERR_OK;
}
case 501:
return status;
}
- r->out.info.info501 = info.info501;
+ r->out.info->info501 = info.info501;
return WERR_OK;
}
case 502:
return status;
}
- r->out.info.info502 = info.info502;
+ r->out.info->info502 = info.info502;
return WERR_OK;
}
case 1005:
return status;
}
- r->out.info.info1005 = info.info1005;
+ r->out.info->info1005 = info.info1005;
return WERR_OK;
}
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
static WERROR dcesrv_srvsvc_fill_share_info(struct share_info *info, int *count,
uint32_t csc_policy,
struct security_descriptor *sd)
{
- int i = 0;
+ unsigned int i = 0;
if (level == 501) {
info[i].name = SHARE_CSC_POLICY;
info = talloc_array(mem_ctx, struct share_info, 10);
W_ERROR_HAVE_NO_MEMORY(info);
- ZERO_STRUCT(r->out);
-
if (strcmp("", r->in.share_name) == 0) {
return WERR_INVALID_PARAM;
}
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lpcfg_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
{
status = dcesrv_srvsvc_fill_share_info(info, &count,
r->in.share_name, r->in.level,
- r->in.info.info0->name,
+ r->in.info->info0->name,
NULL,
NULL,
NULL,
0,
0,
NULL);
- if (W_ERROR_EQUAL(status, WERR_OK)) {
+ if (!W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
break;
{
status = dcesrv_srvsvc_fill_share_info(info, &count,
r->in.share_name, r->in.level,
- r->in.info.info1->name,
+ r->in.info->info1->name,
NULL,
- r->in.info.info1->comment,
+ r->in.info->info1->comment,
NULL,
- r->in.info.info1->type,
+ r->in.info->info1->type,
0,
0,
NULL);
- if (W_ERROR_EQUAL(status, WERR_OK)) {
+ if (!W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
break;
{
status = dcesrv_srvsvc_fill_share_info(info, &count,
r->in.share_name, r->in.level,
- r->in.info.info2->name,
- r->in.info.info2->path,
- r->in.info.info2->comment,
- r->in.info.info2->password,
- r->in.info.info2->type,
- r->in.info.info2->max_users,
+ r->in.info->info2->name,
+ r->in.info->info2->path,
+ r->in.info->info2->comment,
+ r->in.info->info2->password,
+ r->in.info->info2->type,
+ r->in.info->info2->max_users,
0,
NULL);
- if (W_ERROR_EQUAL(status, WERR_OK)) {
+ if (!W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
break;
{
status = dcesrv_srvsvc_fill_share_info(info, &count,
r->in.share_name, r->in.level,
- r->in.info.info501->name,
+ r->in.info->info501->name,
NULL,
- r->in.info.info501->comment,
+ r->in.info->info501->comment,
NULL,
- r->in.info.info501->type,
+ r->in.info->info501->type,
0,
- r->in.info.info501->csc_policy,
+ r->in.info->info501->csc_policy,
NULL);
- if (W_ERROR_EQUAL(status, WERR_OK)) {
+ if (!W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
break;
{
status = dcesrv_srvsvc_fill_share_info(info, &count,
r->in.share_name, r->in.level,
- r->in.info.info502->name,
- r->in.info.info502->path,
- r->in.info.info502->comment,
- r->in.info.info502->password,
- r->in.info.info502->type,
- r->in.info.info502->max_users,
+ r->in.info->info502->name,
+ r->in.info->info502->path,
+ r->in.info->info502->comment,
+ r->in.info->info502->password,
+ r->in.info->info502->type,
+ r->in.info->info502->max_users,
0,
- r->in.info.info502->sd_buf.sd);
- if (W_ERROR_EQUAL(status, WERR_OK)) {
+ r->in.info->info502->sd_buf.sd);
+ if (!W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
break;
r->in.share_name, r->in.level,
NULL,
NULL,
- r->in.info.info1004->comment,
+ r->in.info->info1004->comment,
NULL,
0,
0,
0,
NULL);
- if (W_ERROR_EQUAL(status, WERR_OK)) {
+ if (!W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
break;
struct share_config *scfg = NULL;
char *device;
const char **names;
- int count, i;
+ int count;
+ int i;
*r->out.type = 0;
}
all_string_sub(device, "\\", "/", 0);
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lpcfg_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
struct srvsvc_NetSrvGetInfo *r)
{
struct dcesrv_context *dce_ctx = dce_call->conn->dce_ctx;
+ struct dcerpc_server_info *server_info = lpcfg_dcerpc_server_info(mem_ctx, dce_ctx->lp_ctx);
- ZERO_STRUCT(r->out);
+ ZERO_STRUCTP(r->out.info);
switch (r->in.level) {
case 100:
info100->server_name = dcesrv_common_get_server_name(mem_ctx, dce_ctx, r->in.server_unc);
W_ERROR_HAVE_NO_MEMORY(info100->server_name);
- r->out.info.info100 = info100;
+ r->out.info->info100 = info100;
return WERR_OK;
}
case 101:
info101->server_name = dcesrv_common_get_server_name(mem_ctx, dce_ctx, r->in.server_unc);
W_ERROR_HAVE_NO_MEMORY(info101->server_name);
- info101->version_major = dcesrv_common_get_version_major(mem_ctx, dce_ctx->lp_ctx);
- info101->version_minor = dcesrv_common_get_version_minor(mem_ctx, dce_ctx->lp_ctx);
+ info101->version_major = server_info->version_major;
+ info101->version_minor = server_info->version_minor;
info101->server_type = dcesrv_common_get_server_type(mem_ctx, dce_call->event_ctx, dce_ctx);
- info101->comment = talloc_strdup(mem_ctx, lp_serverstring(dce_ctx->lp_ctx));
+ info101->comment = talloc_strdup(mem_ctx, lpcfg_serverstring(dce_ctx->lp_ctx));
W_ERROR_HAVE_NO_MEMORY(info101->comment);
- r->out.info.info101 = info101;
+ r->out.info->info101 = info101;
return WERR_OK;
}
case 102:
info102->server_name = dcesrv_common_get_server_name(mem_ctx, dce_ctx, r->in.server_unc);
W_ERROR_HAVE_NO_MEMORY(info102->server_name);
- info102->version_major = dcesrv_common_get_version_major(mem_ctx, dce_ctx->lp_ctx);
- info102->version_minor = dcesrv_common_get_version_minor(mem_ctx, dce_ctx->lp_ctx);
+ info102->version_major = server_info->version_major;
+ info102->version_minor = server_info->version_minor;
info102->server_type = dcesrv_common_get_server_type(mem_ctx, dce_call->event_ctx, dce_ctx);
- info102->comment = talloc_strdup(mem_ctx, lp_serverstring(dce_ctx->lp_ctx));
+ info102->comment = talloc_strdup(mem_ctx, lpcfg_serverstring(dce_ctx->lp_ctx));
W_ERROR_HAVE_NO_MEMORY(info102->comment);
info102->users = dcesrv_common_get_users(mem_ctx, dce_ctx);
info102->userpath = dcesrv_common_get_userpath(mem_ctx, dce_ctx);
W_ERROR_HAVE_NO_MEMORY(info102->userpath);
- r->out.info.info102 = info102;
+ r->out.info->info102 = info102;
return WERR_OK;
}
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
static WERROR dcesrv_srvsvc_NetDiskEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetDiskEnum *r)
{
- r->out.info.disks = NULL;
- r->out.info.count = 0;
- r->out.totalentries = 0;
- r->out.resume_handle = NULL;
+ r->out.info->disks = NULL;
+ r->out.info->count = 0;
+ *r->out.totalentries = 0;
switch (r->in.level) {
case 0:
{
/* we can safely hardcode the reply and report we have only one disk (C:) */
/* for some reason Windows wants 2 entries with the second being empty */
- r->out.info.disks = talloc_array(mem_ctx, struct srvsvc_NetDiskInfo0, 2);
- W_ERROR_HAVE_NO_MEMORY(r->out.info.disks);
- r->out.info.count = 2;
+ r->out.info->disks = talloc_array(mem_ctx, struct srvsvc_NetDiskInfo0, 2);
+ W_ERROR_HAVE_NO_MEMORY(r->out.info->disks);
+ r->out.info->count = 2;
- r->out.info.disks[0].disk = talloc_strdup(mem_ctx, "C:");
- W_ERROR_HAVE_NO_MEMORY(r->out.info.disks[0].disk);
+ r->out.info->disks[0].disk = talloc_strdup(mem_ctx, "C:");
+ W_ERROR_HAVE_NO_MEMORY(r->out.info->disks[0].disk);
- r->out.info.disks[1].disk = talloc_strdup(mem_ctx, "");
- W_ERROR_HAVE_NO_MEMORY(r->out.info.disks[1].disk);
+ r->out.info->disks[1].disk = talloc_strdup(mem_ctx, "");
+ W_ERROR_HAVE_NO_MEMORY(r->out.info->disks[1].disk);
- r->out.totalentries = 1;
+ *r->out.totalentries = 1;
r->out.resume_handle = r->in.resume_handle;
return WERR_OK;
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
static WERROR dcesrv_srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetTransportEnum *r)
{
- r->out.level = r->in.level;
- r->out.totalentries = 0;
- r->out.resume_handle = NULL;
+ r->out.transports->level = r->in.transports->level;
+ *r->out.totalentries = 0;
+ if (r->out.resume_handle) {
+ *r->out.resume_handle = 0;
+ }
- switch (r->in.level) {
+ switch (r->in.transports->level) {
case 0:
{
- r->out.transports.ctr0 = talloc(mem_ctx, struct srvsvc_NetTransportCtr0);
- W_ERROR_HAVE_NO_MEMORY(r->out.transports.ctr0);
+ r->out.transports->ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetTransportCtr0);
+ W_ERROR_HAVE_NO_MEMORY(r->out.transports->ctr.ctr0);
- r->out.transports.ctr0->count = 0;
- r->out.transports.ctr0->array = NULL;
+ r->out.transports->ctr.ctr0->count = 0;
+ r->out.transports->ctr.ctr0->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 1:
{
- r->out.transports.ctr1 = talloc(mem_ctx, struct srvsvc_NetTransportCtr1);
- W_ERROR_HAVE_NO_MEMORY(r->out.transports.ctr1);
+ r->out.transports->ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetTransportCtr1);
+ W_ERROR_HAVE_NO_MEMORY(r->out.transports->ctr.ctr1);
- r->out.transports.ctr1->count = 0;
- r->out.transports.ctr1->array = NULL;
+ r->out.transports->ctr.ctr1->count = 0;
+ r->out.transports->ctr.ctr1->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 2:
{
- r->out.transports.ctr2 = talloc(mem_ctx, struct srvsvc_NetTransportCtr2);
- W_ERROR_HAVE_NO_MEMORY(r->out.transports.ctr2);
+ r->out.transports->ctr.ctr2 = talloc(mem_ctx, struct srvsvc_NetTransportCtr2);
+ W_ERROR_HAVE_NO_MEMORY(r->out.transports->ctr.ctr2);
- r->out.transports.ctr2->count = 0;
- r->out.transports.ctr2->array = NULL;
+ r->out.transports->ctr.ctr2->count = 0;
+ r->out.transports->ctr.ctr2->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 3:
{
- r->out.transports.ctr3 = talloc(mem_ctx, struct srvsvc_NetTransportCtr3);
- W_ERROR_HAVE_NO_MEMORY(r->out.transports.ctr3);
+ r->out.transports->ctr.ctr3 = talloc(mem_ctx, struct srvsvc_NetTransportCtr3);
+ W_ERROR_HAVE_NO_MEMORY(r->out.transports->ctr.ctr3);
- r->out.transports.ctr3->count = 0;
- r->out.transports.ctr3->array = NULL;
+ r->out.transports->ctr.ctr3->count = 0;
+ r->out.transports->ctr.ctr3->array = NULL;
return WERR_NOT_SUPPORTED;
}
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
/*
default:
return WERR_INVALID_PARAM;
}
-
- return WERR_INVALID_PARAM;
}
struct share_config *scfg;
struct dcesrv_context *dce_ctx = dce_call->conn->dce_ctx;
- r->out.level = r->in.level;
- ZERO_STRUCT(r->out.ctr);
- r->out.totalentries = 0;
- r->out.resume_handle = NULL;
+ *r->out.totalentries = 0;
/* TODO: - paging of results
*/
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lpcfg_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
return ntstatus_to_werror(nterr);
}
- switch (r->in.level) {
+ switch (r->in.info_ctr->level) {
case 0:
{
- int i, y = 0;
- int count;
+ unsigned int i, y = 0;
+ unsigned int count;
struct srvsvc_NetShareCtr0 *ctr0;
ctr0 = talloc(mem_ctx, struct srvsvc_NetShareCtr0);
ctr0->array = NULL;
if (ctr0->count == 0) {
- r->out.ctr.ctr0 = ctr0;
+ r->out.info_ctr->ctr.ctr0 = ctr0;
return WERR_OK;
}
}
info.info0 = &ctr0->array[y];
- status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.level, &info);
+ status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.info_ctr->level, &info);
W_ERROR_NOT_OK_RETURN(status);
talloc_free(scfg);
y++;
}
talloc_free(snames);
- r->out.ctr.ctr0 = ctr0;
- r->out.totalentries = r->out.ctr.ctr0->count;
+ r->out.info_ctr->ctr.ctr0 = ctr0;
+ *r->out.totalentries = r->out.info_ctr->ctr.ctr0->count;
+
return WERR_OK;
}
case 1:
{
- int i, y = 0;
- int count;
+ unsigned int i, y = 0;
+ unsigned int count;
struct srvsvc_NetShareCtr1 *ctr1;
ctr1 = talloc(mem_ctx, struct srvsvc_NetShareCtr1);
ctr1->array = NULL;
if (ctr1->count == 0) {
- r->out.ctr.ctr1 = ctr1;
+ r->out.info_ctr->ctr.ctr1 = ctr1;
return WERR_OK;
}
}
info.info1 = &ctr1->array[y];
- status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.level, &info);
+ status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.info_ctr->level, &info);
W_ERROR_NOT_OK_RETURN(status);
talloc_free(scfg);
y++;
}
talloc_free(snames);
- r->out.ctr.ctr1 = ctr1;
- r->out.totalentries = r->out.ctr.ctr1->count;
+ r->out.info_ctr->ctr.ctr1 = ctr1;
+ *r->out.totalentries = r->out.info_ctr->ctr.ctr1->count;
+
return WERR_OK;
}
case 2:
{
- int i, y = 0;
- int count;
+ unsigned int i, y = 0;
+ unsigned int count;
struct srvsvc_NetShareCtr2 *ctr2;
SRVSVC_CHECK_ADMIN_ACCESS;
ctr2->array = NULL;
if (ctr2->count == 0) {
- r->out.ctr.ctr2 = ctr2;
+ r->out.info_ctr->ctr.ctr2 = ctr2;
return WERR_OK;
}
}
info.info2 = &ctr2->array[y];
- status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.level, &info);
+ status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.info_ctr->level, &info);
W_ERROR_NOT_OK_RETURN(status);
talloc_free(scfg);
y++;
}
talloc_free(snames);
- r->out.ctr.ctr2 = ctr2;
- r->out.totalentries = r->out.ctr.ctr2->count;
+ r->out.info_ctr->ctr.ctr2 = ctr2;
+ *r->out.totalentries = r->out.info_ctr->ctr.ctr2->count;
+
return WERR_OK;
}
case 502:
{
- int i, y = 0;
- int count;
+ unsigned int i, y = 0;
+ unsigned int count;
struct srvsvc_NetShareCtr502 *ctr502;
SRVSVC_CHECK_ADMIN_ACCESS;
ctr502->array = NULL;
if (ctr502->count == 0) {
- r->out.ctr.ctr502 = ctr502;
+ r->out.info_ctr->ctr.ctr502 = ctr502;
return WERR_OK;
}
}
info.info502 = &ctr502->array[y];
- status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.level, &info);
+ status = dcesrv_srvsvc_fiel_ShareInfo(dce_call, mem_ctx, scfg, r->in.info_ctr->level, &info);
W_ERROR_NOT_OK_RETURN(status);
talloc_free(scfg);
y++;
}
talloc_free(snames);
- r->out.ctr.ctr502 = ctr502;
- r->out.totalentries = r->out.ctr.ctr502->count;
+ r->out.info_ctr->ctr.ctr502 = ctr502;
+ *r->out.totalentries = r->out.info_ctr->ctr.ctr502->count;
+
return WERR_OK;
}
default:
return WERR_UNKNOWN_LEVEL;
}
-
- return WERR_UNKNOWN_LEVEL;
}
NTSTATUS nterr;
struct share_context *sctx;
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lpcfg_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}