summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srvsvc
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server/srvsvc')
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index 752b857667..7299d4cb77 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -247,18 +247,19 @@ static WERROR net_enum_files(TALLOC_CTX *ctx,
/*******************************************************************
Utility function to get the 'type' of a share from an snum.
********************************************************************/
-static uint32 get_share_type(int snum)
+static enum srvsvc_ShareType get_share_type(int snum)
{
/* work out the share type */
- uint32 type = STYPE_DISKTREE;
-
- if (lp_print_ok(snum))
- type = STYPE_PRINTQ;
- if (strequal(lp_fstype(snum), "IPC"))
- type = STYPE_IPC;
- if (lp_administrative_share(snum))
- type |= STYPE_HIDDEN;
+ enum srvsvc_ShareType type = STYPE_DISKTREE;
+ if (lp_print_ok(snum)) {
+ type = lp_administrative_share(snum)
+ ? STYPE_PRINTQ_HIDDEN : STYPE_PRINTQ;
+ }
+ if (strequal(lp_fstype(snum), "IPC")) {
+ type = lp_administrative_share(snum)
+ ? STYPE_IPC_HIDDEN : STYPE_IPC;
+ }
return type;
}