The Samba-Bugzilla – Attachment 41 Details for
Bug 166
Setting ACLs on shares is a bit broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Checks netsharesetinfo 1005 CSC settings to see if they match smb.conf
xpacl.patch (text/plain), 2.97 KB, created by
Jim McDonough
on 2003-07-01 12:48:02 UTC
(
hide
)
Description:
Checks netsharesetinfo 1005 CSC settings to see if they match smb.conf
Filename:
MIME Type:
Creator:
Jim McDonough
Created:
2003-07-01 12:48:02 UTC
Size:
2.97 KB
patch
obsolete
>Index: include/rpc_srvsvc.h >=================================================================== >RCS file: /home/cvs/samba/source/include/rpc_srvsvc.h,v >retrieving revision 1.24.2.2 >diff -u -r1.24.2.2 rpc_srvsvc.h >--- include/rpc_srvsvc.h 17 Aug 2002 17:00:45 -0000 1.24.2.2 >+++ include/rpc_srvsvc.h 1 Jul 2003 17:22:48 -0000 >@@ -463,9 +463,15 @@ > SH_INFO_1004_STR info_1004_str; > } SRV_SHARE_INFO_1004; > >+#define SHARE_1005_IN_DFS 0x00000001 >+#define SHARE_1005_DFS_ROOT 0x00000002 >+/* use the CSC policy mask and shift to match up with the smb.conf parm */ >+#define SHARE_1005_CSC_POLICY_MASK 0x00000030 >+#define SHARE_1005_CSC_POLICY_SHIFT 4 >+ > typedef struct share_info_1005_info > { >- uint32 dfs_root_flag; >+ uint32 share_info_flags; > } SRV_SHARE_INFO_1005; > > typedef struct share_info_1006_info >Index: rpc_parse/parse_srv.c >=================================================================== >RCS file: /home/cvs/samba/source/rpc_parse/parse_srv.c,v >retrieving revision 1.49.2.6 >diff -u -r1.49.2.6 parse_srv.c >--- rpc_parse/parse_srv.c 17 Mar 2003 23:04:03 -0000 1.49.2.6 >+++ rpc_parse/parse_srv.c 1 Jul 2003 17:22:58 -0000 >@@ -623,7 +623,8 @@ > if(!prs_align(ps)) > return False; > >- if(!prs_uint32("dfs_root_flag", ps, depth, &sh1005->dfs_root_flag)) >+ if(!prs_uint32("share_info_flags", ps, depth, >+ &sh1005->share_info_flags)) > return False; > > return True; >Index: rpc_server/srv_srvsvc_nt.c >=================================================================== >RCS file: /home/cvs/samba/source/rpc_server/srv_srvsvc_nt.c,v >retrieving revision 1.70.2.13 >diff -u -r1.70.2.13 srv_srvsvc_nt.c >--- rpc_server/srv_srvsvc_nt.c 29 May 2003 23:49:31 -0000 1.70.2.13 >+++ rpc_server/srv_srvsvc_nt.c 1 Jul 2003 17:23:05 -0000 >@@ -432,10 +432,13 @@ > > static void init_srv_share_info_1005(pipes_struct *p, SRV_SHARE_INFO_1005* sh1005, int snum) > { >- sh1005->dfs_root_flag = 0; >+ sh1005->share_info_flags = 0; > > if(lp_host_msdfs() && lp_msdfs_root(snum)) >- sh1005->dfs_root_flag = 3; >+ sh1005->share_info_flags |= >+ SHARE_1005_IN_DFS | SHARE_1005_DFS_ROOT; >+ sh1005->share_info_flags |= >+ lp_csc_policy(snum) << SHARE_1005_CSC_POLICY_SHIFT; > } > /*************************************************************************** > Fill in a share info level 1006 structure. >@@ -1513,6 +1516,19 @@ > type = STYPE_DISKTREE; > break; > case 1005: >+ /* XP re-sets the csc policy even if it wasn't changed by the >+ user, so we must compare it to see if it's what is set in >+ smb.conf, so that we can contine other ops like setting >+ ACLs on a share */ >+ if (((q_u->info.share.info1005.share_info_flags & >+ SHARE_1005_CSC_POLICY_MASK) >> >+ SHARE_1005_CSC_POLICY_SHIFT) == lp_csc_policy(snum)) >+ return WERR_OK; >+ else { >+ DEBUG(3, ("_srv_net_share_set_info: client is trying to change csc policy from the network; must be done with smb.conf\n")); >+ return WERR_ACCESS_DENIED; >+ } >+ break; > case 1006: > case 1007: > return WERR_ACCESS_DENIED;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 166
: 41