svn commit: samba r17032 - in branches/SAMBA_3_0/source: lib
rpc_server script/tests utils
vlendec at samba.org
vlendec at samba.org
Fri Jul 14 17:46:07 GMT 2006
Author: vlendec
Date: 2006-07-14 17:46:06 +0000 (Fri, 14 Jul 2006)
New Revision: 17032
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17032
Log:
I thought I had already merged this from trunk:
> r16959 | vlendec | 2006-07-11 23:10:44 +0200 (Di, 11 Jul 2006) | 1 line
>
> get_share_security does not need snum, activate RPC-SAMBA3-SRVSVC
Volker
Modified:
branches/SAMBA_3_0/source/lib/sharesec.c
branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh
branches/SAMBA_3_0/source/utils/sharesec.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/sharesec.c
===================================================================
--- branches/SAMBA_3_0/source/lib/sharesec.c 2006-07-14 05:43:00 UTC (rev 17031)
+++ branches/SAMBA_3_0/source/lib/sharesec.c 2006-07-14 17:46:06 UTC (rev 17032)
@@ -108,7 +108,8 @@
Pull a security descriptor from the share tdb.
********************************************************************/
-SEC_DESC *get_share_security( TALLOC_CTX *ctx, int snum, size_t *psize)
+SEC_DESC *get_share_security( TALLOC_CTX *ctx, const char *servicename,
+ size_t *psize)
{
prs_struct ps;
fstring key;
@@ -122,12 +123,13 @@
/* Fetch security descriptor from tdb */
- slprintf(key, sizeof(key)-1, "SECDESC/%s", lp_servicename(snum));
+ slprintf(key, sizeof(key)-1, "SECDESC/%s", servicename);
if (tdb_prs_fetch(share_tdb, key, &ps, ctx)!=0 ||
!sec_io_desc("get_share_security", &psd, &ps, 1)) {
- DEBUG(4,("get_share_security: using default secdesc for %s\n", lp_servicename(snum) ));
+ DEBUG(4, ("get_share_security: using default secdesc for %s\n",
+ servicename));
return get_share_security_default(ctx, psize, GENERIC_ALL_ACCESS);
}
Modified: branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c 2006-07-14 05:43:00 UTC (rev 17031)
+++ branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c 2006-07-14 17:46:06 UTC (rev 17032)
@@ -338,7 +338,7 @@
if (mem_ctx == NULL)
return False;
- psd = get_share_security(mem_ctx, snum, &sd_size);
+ psd = get_share_security(mem_ctx, lp_servicename(snum), &sd_size);
if (!psd)
goto out;
@@ -415,7 +415,7 @@
pstrcpy(passwd, "");
- sd = get_share_security(ctx, snum, &sd_size);
+ sd = get_share_security(ctx, lp_servicename(snum), &sd_size);
init_srv_share_info502(&sh502->info_502, net_name, get_share_type(snum), remark, 0, 0xffffffff, 1, path, passwd, sd, sd_size);
init_srv_share_info502_str(&sh502->info_502_str, net_name, remark, path, passwd, sd, sd_size);
@@ -493,7 +493,7 @@
ZERO_STRUCTP(sh1501);
- sd = get_share_security(ctx, snum, &sd_size);
+ sd = get_share_security(ctx, lp_servicename(snum), &sd_size);
sh1501->sdb = make_sec_desc_buf(p->mem_ctx, sd_size, sd);
}
@@ -1684,7 +1684,8 @@
SEC_DESC *old_sd;
size_t sd_size;
- old_sd = get_share_security(p->mem_ctx, snum, &sd_size);
+ old_sd = get_share_security(p->mem_ctx, lp_servicename(snum),
+ &sd_size);
if (old_sd && !sec_desc_equal(old_sd, psd)) {
if (!set_share_security(p->mem_ctx, share_name, psd))
Modified: branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh
===================================================================
--- branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh 2006-07-14 05:43:00 UTC (rev 17031)
+++ branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh 2006-07-14 17:46:06 UTC (rev 17032)
@@ -34,6 +34,7 @@
raw="$raw RAW-SAMBA3HIDE RAW-SAMBA3BADPATH"
rpc="RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-NETLOGSAMBA3 RPC-SAMBA3SESSIONKEY"
+rpc="$rpc RPC-SAMBA3-SRVSVC"
tests="$base $raw $rpc"
Modified: branches/SAMBA_3_0/source/utils/sharesec.c
===================================================================
--- branches/SAMBA_3_0/source/utils/sharesec.c 2006-07-14 05:43:00 UTC (rev 17031)
+++ branches/SAMBA_3_0/source/utils/sharesec.c 2006-07-14 17:46:06 UTC (rev 17032)
@@ -382,7 +382,8 @@
switch ( mode ) {
case SMB_ACL_VIEW:
- if (!(secdesc = get_share_security( ctx, snum, &sd_size )) ) {
+ if (!(secdesc = get_share_security( ctx, sharename,
+ &sd_size )) ) {
fprintf(stderr, "Unable to retrieve permissions for share [%s]\n", sharename);
return -1;
}
More information about the samba-cvs
mailing list