1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

Fix from "Jim McDonough" <jmcd@us.ibm.com>" - when we use open_file_shared(),

we need to close with close_file().
Jeremy.
(This used to be commit 5b2ffd160f)
This commit is contained in:
Jeremy Allison 2001-06-22 18:58:35 +00:00
parent 868d010aa1
commit b08ee8995d
2 changed files with 9 additions and 9 deletions

View File

@ -644,7 +644,7 @@ static uint32 get_correct_cversion(fstring architecture, fstring driverpath_in,
DEBUG(10,("get_correct_cversion: Driver file [%s] cversion = %d\n",
driverpath, cversion));
fsp->conn->vfs_ops.close(fsp, fsp->fd);
close_file(fsp, True);
file_free(fsp);
close_cnum(conn, user->vuid);
pop_sec_ctx();
@ -654,7 +654,7 @@ static uint32 get_correct_cversion(fstring architecture, fstring driverpath_in,
error_exit:
if(fsp) {
if(fsp->fd != -1)
fsp->conn->vfs_ops.close(fsp, fsp->fd);
close_file(fsp, True);
file_free(fsp);
}
@ -1138,7 +1138,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file,
DEBUGADD(6,("file_version_is_newer: mod time = %ld sec\n", old_create_time));
}
}
fsp->conn->vfs_ops.close(fsp, fsp->fd);
close_file(fsp, True);
file_free(fsp);
@ -1169,7 +1169,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file,
DEBUGADD(6,("file_version_is_newer: mod time = %ld sec\n", new_create_time));
}
}
fsp->conn->vfs_ops.close(fsp, fsp->fd);
close_file(fsp, True);
file_free(fsp);
if (use_version) {
@ -1201,7 +1201,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file,
if(fsp) {
file_free(fsp);
if(fsp->fd != -1)
fsp->conn->vfs_ops.close(fsp, fsp->fd);
close_file(fsp, True);
}
return -1;
}

View File

@ -1639,7 +1639,7 @@ uint32 _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
psd->dacl->revision = (uint16) NT4_ACL_REVISION;
fsp->conn->vfs_ops.close(fsp, fsp->fd);
close_file(fsp, True);
file_free(fsp);
close_cnum(conn, user.vuid);
@ -1648,7 +1648,7 @@ uint32 _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
error_exit:
if(fsp) {
fsp->conn->vfs_ops.close(fsp, fsp->fd);
close_file(fsp, True);
file_free(fsp);
}
@ -1726,7 +1726,7 @@ uint32 _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_
goto error_exit;
}
fsp->conn->vfs_ops.close(fsp, fsp->fd);
close_file(fsp, True);
file_free(fsp);
close_cnum(conn, user.vuid);
return r_u->status;
@ -1734,7 +1734,7 @@ uint32 _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_
error_exit:
if(fsp) {
fsp->conn->vfs_ops.close(fsp, fsp->fd);
close_file(fsp, True);
file_free(fsp);
}