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

s3: smbd: Rename OpenDir_ntstatus() -> OpenDir().

We now have a single OpenDir() function that returns an NTSTATUS.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Mar  2 21:58:32 UTC 2022 on sn-devel-184
This commit is contained in:
Jeremy Allison 2022-02-28 14:34:48 -08:00 committed by Volker Lendecke
parent c0bbf6f411
commit 0c113e652f
11 changed files with 87 additions and 87 deletions

View File

@ -236,12 +236,12 @@ static int ceph_snap_enum_snapdir(struct vfs_handle_struct *handle,
* via readdir.
*/
status = OpenDir_ntstatus(frame,
handle->conn,
snaps_dname,
NULL,
0,
&dir_hnd);
status = OpenDir(frame,
handle->conn,
snaps_dname,
NULL,
0,
&dir_hnd);
if (!NT_STATUS_IS_OK(status)) {
ret = -map_errno_from_nt_status(status);
goto err_out;
@ -564,12 +564,12 @@ static int ceph_snap_gmt_convert_dir(struct vfs_handle_struct *handle,
DBG_DEBUG("enumerating shadow copy dir at %s\n",
snaps_dname->base_name);
status = OpenDir_ntstatus(tmp_ctx,
handle->conn,
snaps_dname,
NULL,
0,
&dir_hnd);
status = OpenDir(tmp_ctx,
handle->conn,
snaps_dname,
NULL,
0,
&dir_hnd);
if (!NT_STATUS_IS_OK(status)) {
ret = -map_errno_from_nt_status(status);
goto err_out;

View File

@ -5076,12 +5076,12 @@ static bool fruit_get_num_bands(vfs_handle_struct *handle,
return false;
}
status = OpenDir_ntstatus(talloc_tos(),
handle->conn,
bands_dir,
NULL,
0,
&dir_hnd);
status = OpenDir(talloc_tos(),
handle->conn,
bands_dir,
NULL,
0,
&dir_hnd);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(bands_dir);
errno = map_errno_from_nt_status(status);
@ -5221,12 +5221,12 @@ static uint64_t fruit_disk_free(vfs_handle_struct *handle,
_dsize);
}
status = OpenDir_ntstatus(talloc_tos(),
handle->conn,
smb_fname,
NULL,
0,
&dir_hnd);
status = OpenDir(talloc_tos(),
handle->conn,
smb_fname,
NULL,
0,
&dir_hnd);
if (!NT_STATUS_IS_OK(status)) {
errno = map_errno_from_nt_status(status);
return UINT64_MAX;

View File

@ -191,12 +191,12 @@ static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle,
return -1;
}
status = OpenDir_ntstatus(talloc_tos(),
handle->conn,
smb_fname,
NULL,
0,
&dir_hnd);
status = OpenDir(talloc_tos(),
handle->conn,
smb_fname,
NULL,
0,
&dir_hnd);
TALLOC_FREE(smb_fname);
if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("OpenDir() failed for [%s]\n", fsp->conn->connectpath);

View File

@ -595,7 +595,7 @@ static NTSTATUS walk_streams(vfs_handle_struct *handle,
orig_connectpath = handle->conn->connectpath;
handle->conn->connectpath = rootdir;
status = OpenDir_ntstatus(
status = OpenDir(
talloc_tos(), handle->conn, dir_smb_fname, NULL, 0, &dir_hnd);
if (!NT_STATUS_IS_OK(status)) {
handle->conn->connectpath = orig_connectpath;

View File

@ -79,12 +79,12 @@ static void syncops_sync_directory(connection_struct *conn,
struct smb_filename smb_dname = { .base_name = dname };
NTSTATUS status;
status = OpenDir_ntstatus(talloc_tos(),
conn,
&smb_dname,
"*",
0,
&dir_hnd);
status = OpenDir(talloc_tos(),
conn,
&smb_dname,
"*",
0,
&dir_hnd);
if (!NT_STATUS_IS_OK(status)) {
errno = map_errno_from_nt_status(status);
return;

View File

@ -855,12 +855,12 @@ bool recursive_rmdir(TALLOC_CTX *ctx,
SMB_ASSERT(!is_ntfs_stream_smb_fname(smb_dname));
status = OpenDir_ntstatus(talloc_tos(),
conn,
smb_dname,
NULL,
0,
&dir_hnd);
status = OpenDir(talloc_tos(),
conn,
smb_dname,
NULL,
0,
&dir_hnd);
if (!NT_STATUS_IS_OK(status)) {
errno = map_errno_from_nt_status(status);
return False;
@ -1052,12 +1052,12 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, struct files_struct *fsp)
* files non-visible to the client. If not, fail the delete.
*/
status = OpenDir_ntstatus(talloc_tos(),
conn,
smb_dname,
NULL,
0,
&dir_hnd);
status = OpenDir(talloc_tos(),
conn,
smb_dname,
NULL,
0,
&dir_hnd);
if (!NT_STATUS_IS_OK(status)) {
/*
* Note, we deliberately squash the error here

View File

@ -1477,12 +1477,12 @@ static int smb_Dir_OpenDir_destructor(struct smb_Dir *dir_hnd)
return 0;
}
NTSTATUS OpenDir_ntstatus(TALLOC_CTX *mem_ctx,
connection_struct *conn,
const struct smb_filename *smb_dname,
const char *mask,
uint32_t attr,
struct smb_Dir **_dir_hnd)
NTSTATUS OpenDir(TALLOC_CTX *mem_ctx,
connection_struct *conn,
const struct smb_filename *smb_dname,
const char *mask,
uint32_t attr,
struct smb_Dir **_dir_hnd)
{
struct files_struct *fsp = NULL;
struct smb_Dir *dir_hnd = NULL;
@ -1898,7 +1898,7 @@ NTSTATUS can_delete_directory_fsp(files_struct *fsp)
struct connection_struct *conn = fsp->conn;
struct smb_Dir *dir_hnd = NULL;
status = OpenDir_ntstatus(
status = OpenDir(
talloc_tos(), conn, fsp->fsp_name, NULL, 0, &dir_hnd);
if (!NT_STATUS_IS_OK(status)) {
return status;

View File

@ -1606,7 +1606,7 @@ int get_real_filename_full_scan(connection_struct *conn,
}
/* open the directory */
status = OpenDir_ntstatus(
status = OpenDir(
talloc_tos(), conn, smb_fname, NULL, 0, &cur_dir);
if (!NT_STATUS_IS_OK(status)) {
DBG_NOTICE("scan dir didn't open dir [%s]: %s\n",

View File

@ -1647,12 +1647,12 @@ static size_t count_dfs_links(TALLOC_CTX *ctx,
}
/* Now enumerate all dfs links */
status = OpenDir_ntstatus(frame,
conn,
smb_fname,
NULL,
0,
&dir_hnd);
status = OpenDir(frame,
conn,
smb_fname,
NULL,
0,
&dir_hnd);
if (!NT_STATUS_IS_OK(status)) {
errno = map_errno_from_nt_status(status);
goto out;
@ -1790,12 +1790,12 @@ static int form_junctions(TALLOC_CTX *ctx,
}
/* Now enumerate all dfs links */
status = OpenDir_ntstatus(frame,
conn,
smb_fname,
NULL,
0,
&dir_hnd);
status = OpenDir(frame,
conn,
smb_fname,
NULL,
0,
&dir_hnd);
if (!NT_STATUS_IS_OK(status)) {
errno = map_errno_from_nt_status(status);
goto out;

View File

@ -231,12 +231,12 @@ bool get_dir_entry(TALLOC_CTX *ctx,
bool ask_sharemode);
struct smb_Dir;
bool is_visible_fsp(files_struct *fsp);
NTSTATUS OpenDir_ntstatus(TALLOC_CTX *mem_ctx,
connection_struct *conn,
const struct smb_filename *smb_dname,
const char *mask,
uint32_t attr,
struct smb_Dir **_dir_hnd);
NTSTATUS OpenDir(TALLOC_CTX *mem_ctx,
connection_struct *conn,
const struct smb_filename *smb_dname,
const char *mask,
uint32_t attr,
struct smb_Dir **_dir_hnd);
const char *ReadDirName(struct smb_Dir *dir_hnd, long *poffset,
SMB_STRUCT_STAT *sbuf, char **talloced);
void RewindDir(struct smb_Dir *dir_hnd, long *poffset);

View File

@ -166,12 +166,12 @@ static NTSTATUS cmd_opendir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc
return NT_STATUS_NO_MEMORY;
}
status = OpenDir_ntstatus(vfs->conn,
vfs->conn,
smb_fname,
NULL,
0,
&vfs->currentdir);
status = OpenDir(vfs->conn,
vfs->conn,
smb_fname,
NULL,
0,
&vfs->currentdir);
if (!NT_STATUS_IS_OK(status)) {
int err = map_errno_from_nt_status(status);
printf("opendir error=%d (%s)\n", err, strerror(err));
@ -2111,12 +2111,12 @@ static NTSTATUS cmd_translate_name(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
return NT_STATUS_NO_MEMORY;
}
status = OpenDir_ntstatus(vfs->conn,
vfs->conn,
smb_fname,
NULL,
0,
&vfs->currentdir);
status = OpenDir(vfs->conn,
vfs->conn,
smb_fname,
NULL,
0,
&vfs->currentdir);
if (!NT_STATUS_IS_OK(status)) {
int err = map_errno_from_nt_status(status);
DEBUG(0, ("cmd_translate_name: opendir error=%d (%s)\n",