diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-04-08 19:59:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:51:09 -0500 |
commit | d907dcf383fcdf82add4fd7c397885eab5bb57af (patch) | |
tree | 13ea41238bf62a54f75342c73e8cc8f9471b1324 | |
parent | 8709182fd3c740619fdb075b24023b1eaf192fcd (diff) | |
download | samba-d907dcf383fcdf82add4fd7c397885eab5bb57af.tar.gz samba-d907dcf383fcdf82add4fd7c397885eab5bb57af.tar.bz2 samba-d907dcf383fcdf82add4fd7c397885eab5bb57af.zip |
r127: NetWkstaGetInfo level 101
and return WERR_ACCESS_DENIED for level 102, 502 so does my winXP box
for a non-admin user
metze
(This used to be commit 975bf13f17e0bd95ec37af3534e5209c1de99252)
-rw-r--r-- | source4/rpc_server/common/server_info.c | 6 | ||||
-rw-r--r-- | source4/rpc_server/common/share_info.c | 7 | ||||
-rw-r--r-- | source4/rpc_server/wkssvc/dcesrv_wkssvc.c | 16 |
3 files changed, 21 insertions, 8 deletions
diff --git a/source4/rpc_server/common/server_info.c b/source4/rpc_server/common/server_info.c index 9c57d819e1..fc86e0f8c1 100644 --- a/source4/rpc_server/common/server_info.c +++ b/source4/rpc_server/common/server_info.c @@ -53,3 +53,9 @@ uint32 dcesrv_common_get_version_minor(TALLOC_CTX *mem_ctx, struct dcesrv_contex { return 2; } + +/* This hardcoded value should go into a ldb database! */ +const char *dcesrv_common_get_lan_root(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx) +{ + return ""; +} diff --git a/source4/rpc_server/common/share_info.c b/source4/rpc_server/common/share_info.c index 68b770437d..8cf130ab51 100644 --- a/source4/rpc_server/common/share_info.c +++ b/source4/rpc_server/common/share_info.c @@ -64,11 +64,12 @@ uint32 dcesrv_common_get_share_current_users(TALLOC_CTX *mem_ctx, struct dcesrv_ /* This hardcoded value should go into a ldb database! */ uint32 dcesrv_common_get_share_type(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum) { - /* for disk share 0x00000000 - * for IPC$ share 0x00000003 + /* for disk share 0x00000000 + * for print share 0x00000001 + * for IPC$ share 0x00000003 * * administrative shares: - * ADMIN$, C$ and IPC$ are type |= 0x80000000 + * ADMIN$, IPC$, C$, D$, E$ ... are type |= 0x80000000 * this ones are hidden in NetShareEnum, but shown in NetShareEnumAll */ return 0; diff --git a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c index f114dda1c0..39bd6bfea8 100644 --- a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c +++ b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c @@ -47,21 +47,27 @@ static NTSTATUS wkssvc_NetWkstaGetInfo(struct dcesrv_call_state *dce_call, TALLO break; } case 101: { - r->out.info.info101 = NULL; - - r->out.result = WERR_NOT_SUPPORTED; + r->out.info.info101 = talloc_p(mem_ctx, struct wkssvc_NetWkstaInfo101); + WERR_TALLOC_CHECK(r->out.info.info101); + + r->out.info.info101->platform_id = dcesrv_common_get_platform_id(mem_ctx, dce_ctx); + r->out.info.info101->server = dcesrv_common_get_server_name(mem_ctx, dce_ctx); + r->out.info.info101->domain = dcesrv_common_get_domain_name(mem_ctx, dce_ctx); + r->out.info.info101->ver_major = dcesrv_common_get_version_major(mem_ctx, dce_ctx); + r->out.info.info101->ver_minor = dcesrv_common_get_version_minor(mem_ctx, dce_ctx); + r->out.info.info101->lan_root = dcesrv_common_get_lan_root(mem_ctx, dce_ctx); break; } case 102: { r->out.info.info102 = NULL; - r->out.result = WERR_NOT_SUPPORTED; + r->out.result = WERR_ACCESS_DENIED; break; } case 502: { r->out.info.info502 = NULL; - r->out.result = WERR_NOT_SUPPORTED; + r->out.result = WERR_ACCESS_DENIED; break; } default: { |