diff options
author | Jeremy Allison <jra@samba.org> | 2002-04-10 01:04:13 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-04-10 01:04:13 +0000 |
commit | 4ad0ff29bf44e2506311f672bf912e7a2d39048a (patch) | |
tree | 1fdb01989a1fb36ef35e408950b6ce8c960c9872 /source3/rpc_server | |
parent | 74af2c2cca3f2a5d54f013c596d0093d279c8920 (diff) | |
download | samba-4ad0ff29bf44e2506311f672bf912e7a2d39048a.tar.gz samba-4ad0ff29bf44e2506311f672bf912e7a2d39048a.tar.bz2 samba-4ad0ff29bf44e2506311f672bf912e7a2d39048a.zip |
Added Shirish's client side caching policy change.
Jeremy.
(This used to be commit 16015c07eab2e57fa3771051e3e08fde21757cfa)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_srvsvc_nt.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index 295c733ab5..6416cfc4ac 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -343,6 +343,38 @@ BOOL share_access_check(connection_struct *conn, int snum, uint16 vuid, uint32 d } /******************************************************************* + Fill in a share info level 501 structure. +********************************************************************/ + +static void init_srv_share_info_501(pipes_struct *p, SRV_SHARE_INFO_501 *sh501, int snum) +{ + int len_net_name; + pstring net_name; + pstring remark; + uint32 type; + uint32 csc_policy; + + pstrcpy(net_name, lp_servicename(snum)); + pstrcpy(remark, lp_comment(snum)); + standard_sub_conn(p->conn, remark); + + len_net_name = strlen(net_name); + + /* work out the share type */ + type = STYPE_DISKTREE; + + if (lp_print_ok(snum)) + type = STYPE_PRINTQ; + if (strequal("IPC$", net_name) || strequal("ADMIN$", net_name)) + type = STYPE_IPC; + if (net_name[len_net_name] == '$') + type |= STYPE_HIDDEN; + + init_srv_share_info501(&sh501->info_501, net_name, type, remark, (lp_csc_policy(snum) << 4)); + init_srv_share_info501_str(&sh501->info_501_str, net_name, remark); +} + +/******************************************************************* Fill in a share info level 502 structure. ********************************************************************/ @@ -484,6 +516,23 @@ static BOOL init_srv_share_info_ctr(pipes_struct *p, SRV_SHARE_INFO_CTR *ctr, break; } + case 501: + { + SRV_SHARE_INFO_501 *info501; + int i = 0; + + info501 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_501)); + + for (snum = *resume_hnd; snum < num_services; snum++) { + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_admin_share(snum)) ) { + init_srv_share_info_501(p, &info501[i++], snum); + } + } + + ctr->share.info501 = info501; + break; + } + case 502: { SRV_SHARE_INFO_502 *info502; @@ -552,6 +601,9 @@ static void init_srv_r_net_share_get_info(pipes_struct *p, SRV_R_NET_SHARE_GET_I case 2: init_srv_share_info_2(p, &r_n->info.share.info2, snum); break; + case 501: + init_srv_share_info_501(p, &r_n->info.share.info501, snum); + break; case 502: init_srv_share_info_502(p, &r_n->info.share.info502, snum); break; |