summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-13 12:24:03 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-13 15:45:36 +0100
commitae7d8778415234eb85df1aceb024875691ccb8ef (patch)
tree16b8529ce890ac81b51b34d11965ae2ed45d0063
parentcefb797434ef738870b3f2447fdbeea361bdea57 (diff)
downloadsamba-ae7d8778415234eb85df1aceb024875691ccb8ef.tar.gz
samba-ae7d8778415234eb85df1aceb024875691ccb8ef.tar.bz2
samba-ae7d8778415234eb85df1aceb024875691ccb8ef.zip
s3:smbd: use connections_snum_used() instead of conn_snum_used() for load_usershare_shares()
Before removing the share security descriptor, we should make sure there're really no active users anymore. metze
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c2
-rw-r--r--source3/smbd/lanman.c2
-rw-r--r--source3/smbd/msdfs.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index f4f37c3b00..4435b996da 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -574,7 +574,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
/* Ensure all the usershares are loaded. */
become_root();
- load_usershare_shares(msg_ctx_to_sconn(p->msg_ctx), conn_snum_used);
+ load_usershare_shares(NULL, connections_snum_used);
load_registry_shares();
num_services = lp_numservices();
unbecome_root();
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 8fa248c8cb..31775bf5f4 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -2092,7 +2092,7 @@ static bool api_RNetShareEnum(struct smbd_server_connection *sconn,
/* Ensure all the usershares are loaded. */
become_root();
load_registry_shares();
- count = load_usershare_shares(sconn, conn_snum_used);
+ count = load_usershare_shares(NULL, connections_snum_used);
unbecome_root();
data_len = fixed_len = string_len = 0;
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index fa3d28cf44..5ee7897867 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -1491,7 +1491,7 @@ struct junction_map *enum_msdfs_links(struct smbd_server_connection *sconn,
/* Ensure all the usershares are loaded. */
become_root();
load_registry_shares();
- sharecount = load_usershare_shares(sconn, conn_snum_used);
+ sharecount = load_usershare_shares(NULL, connections_snum_used);
unbecome_root();
for(i=0;i < sharecount;i++) {