srvsvc: Use the passed-in file id, not the one from share_mode_entry
authorVolker Lendecke <vl@samba.org>
Wed, 7 Feb 2018 09:52:23 +0000 (10:52 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 12 Feb 2018 23:26:43 +0000 (00:26 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_server/srvsvc/srv_srvsvc_nt.c

index 19e63053ecedede30e835b76312d3a38ebeede2f..0d15381e31c46545e290484d1330a8e2a92dc772 100644 (file)
@@ -124,7 +124,7 @@ static int enum_file_fn(const struct share_mode_entry *e,
        /* need to count the number of locks on a file */
 
        ZERO_STRUCT( fsp );
-       fsp.file_id = e->id;
+       fsp.file_id = *id;
 
        if ( (brl = brl_get_locks(talloc_tos(), &fsp)) != NULL ) {
                num_locks = brl_num_locks(brl);