diff options
author | Volker Lendecke <vl@samba.org> | 2011-07-04 16:27:23 +0200 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2011-07-04 18:47:59 +0200 |
commit | 0bec150ab184903e17702e4d684d35d0d2c88010 (patch) | |
tree | e5e4ecb4aab528531550532bc19573fe9035c9d5 /source3/rpc_server | |
parent | 7c96e96e9881ec1ad7b41f0ab241a5b0ac17b93f (diff) | |
download | samba-0bec150ab184903e17702e4d684d35d0d2c88010.tar.gz samba-0bec150ab184903e17702e4d684d35d0d2c88010.tar.bz2 samba-0bec150ab184903e17702e4d684d35d0d2c88010.zip |
s3: Fix an enum/int mixup
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jul 4 18:47:59 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 19 |
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; } |