Fix 2 bugs with displaying open file state. Firstly
authorJeremy Allison <jra@samba.org>
Thu, 22 May 2008 21:28:13 +0000 (14:28 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 22 May 2008 21:28:13 +0000 (14:28 -0700)
the IDL is documented incorrectly in the MS-DOCS.
Username and path need to be reversed (yes I will
raise this with MS). Secondly, we need to check
access_mask for the permissions, not share_access
(share_access are the deny modes).
Jeremy.
(This used to be commit bdaad19f90e991aba2afccfa13afbbfe2ac7baaf)

source3/rpc_server/srv_srvsvc_nt.c

index 947ad46568cb4963bdca22205bcb53c5324fa628..5e17693bfa164cec9eabbc2602dbaa023a3674bb 100644 (file)
@@ -105,8 +105,8 @@ static int pipe_enum_fn( struct db_record *rec, void *p)
                                 (uint32_t)((procid_to_pid(&prec.pid)<<16) & prec.pnum),
                                 (FILE_READ_DATA|FILE_WRITE_DATA),
                                 0,
-                                fullpath,
-                                username);
+                                username,
+                                fullpath);
 
        fenum->ctr3->count++;
 
@@ -200,7 +200,7 @@ static void enum_file_fn( const struct share_mode_entry *e,
        string_replace( fullpath, '/', '\\' );
 
        /* mask out create (what ever that is) */
-       permissions = e->share_access & (FILE_READ_DATA|FILE_WRITE_DATA);
+       permissions = e->access_mask & (FILE_READ_DATA|FILE_WRITE_DATA);
 
        /* now fill in the srvsvc_NetFileInfo3 struct */
        init_srvsvc_NetFileInfo3(&fenum->ctr3->array[i],