srvsvc 0x27 patch

Mike Pain mtp at blaby.gov.uk
Tue Jun 19 10:51:37 GMT 2001


Jim,
thanks but....
I now can't update Permissions on ordinary files.  Directories seem to work,
but when I try to change the ACL on a file I get a Windows NT (!) popup box
with "Access is denied." in it.  On first connecting to a share I now get
the "Procedure number is out of range" when clicking on Permissions first
time, but this doesn't occur again until the share is disconnected.  When
trying the file, I get a new file lock entry (as shown by smbstatus) each
time I go into the Permissions box.  Also, the log entries show things like:
[2001/06/19 11:42:13, 2] smbd/open.c:check_share_mode(426)
  Share violation on file (0,0,0,14999,fred,fcbopen = 0, flags = 2) = 1
[2001/06/19 11:42:13, 2] smbd/open.c:open_file(216)
  mike opened file fred read=Yes write=Yes (numopen=1)
[2001/06/19 11:42:13, 0] smbd/open.c:open_directory(1064)
  open_directory: fred is not a directory !

Sorry to be a nuisance...
Thanks
Mike
----- Original Message -----
From: "Jim McDonough" <jmcd at us.ibm.com>
To: <jeremy at valinux.com>; <samba-technical at samba.org>
Cc: <mtp at blaby.gov.uk>
Sent: Monday, June 18, 2001 6:37 PM
Subject: srvsvc 0x27 patch


> Ok, here's the directory code.  Hmm, must have clicked on the wrong icon
if
> I ever got this to work before...
>
> --- rpc_server/srv_srvsvc_nt.c     Mon Jun 18 09:23:03 2001
> +++ /samba/mine/2.2/source/rpc_server/srv_srvsvc_nt.c   Mon Jun 18
11:27:48
> 2001
> @@ -1611,9 +1611,14 @@
>                     (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0,
> &access_mode, &action);
>
>      if (!fsp) {
> -         DEBUG(3,("_srv_net_file_query_secdesc: Unable to open file
%s\n",
> filename));
> -         r_u->status = ERROR_ACCESS_DENIED;
> -         goto error_exit;
> +         /* Perhaps it is a directory */
> +         fsp = open_directory(conn, filename, &st,
> +              (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, &action);
> +         if (!fsp) {
> +              DEBUG(3,("_srv_net_file_query_secdesc: Unable to open file
> %s\n", filename));
> +              r_u->status = ERROR_ACCESS_DENIED;
> +              goto error_exit;
> +         }
>      }
>
>      sd_size = conn->vfs_ops.get_nt_acl(fsp, fsp->fsp_name, &psd);
> @@ -1699,9 +1704,14 @@
>                (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0,
> &access_mode, &action);
>
>      if (!fsp) {
> -         DEBUG(3,("_srv_net_file_set_secdesc: Unable to open file %s\n",
> filename));
> -         r_u->status = ERROR_ACCESS_DENIED;
> -         goto error_exit;
> +                /* Perhaps it is a directory */
> +                fsp = open_directory(conn, filename, &st,
> +                        (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0,
&action);
> +                if (!fsp) {
> +              DEBUG(3,("_srv_net_file_set_secdesc: Unable to open file
%s\n", filename));
> +              r_u->status = ERROR_ACCESS_DENIED;
> +              goto error_exit;
> +         }
>      }
>
>      ret = conn->vfs_ops.set_nt_acl(fsp, fsp->fsp_name, q_u->sec_info,
q_u->sec_desc);
>
> ----------------------------
> Jim McDonough
> Linux Technology Center
> IBM Boulder
>
> Notes: Jim McDonough/Boulder/IBM @ IBMUS
> VNET: JMCD at IBMUSM54
> Internet: jmcd at us.ibm.com
>
> Phone: (303) 924-5822
> T/L: 263-5822
>
>
>



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This message has been scanned for viruses.
Blaby District Council - 0116 275 0555
**********************************************************************




More information about the samba-technical mailing list