diff options
author | Volker Lendecke <vl@samba.org> | 2022-03-07 18:00:20 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2022-03-10 18:23:36 +0000 |
commit | 854e8091b78dfcfb909dc34f5d1943fa0dd7deb1 (patch) | |
tree | ed0e6554ea7a432b4f7fc50959e03d7610e9c828 /examples | |
parent | 812cb602e3be3ffc4400cff1df63295cf2f4cd21 (diff) | |
download | samba-854e8091b78dfcfb909dc34f5d1943fa0dd7deb1.tar.gz |
vfs: Convert get_real_filename() to NTSTATUS
This makes it possible to more easily handle STOPPED_ON_SYMLINK vs
OBJECT_PATH_NOT_FOUND vs OBJECT_NAME_NOT_FOUND and so on. The next
patch needs this to properly handle symlinks.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/VFS/skel_opaque.c | 12 | ||||
-rw-r--r-- | examples/VFS/skel_transparent.c | 9 |
2 files changed, 11 insertions, 10 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index e39668ed2a8..4719a45e7bb 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -651,13 +651,13 @@ static NTSTATUS skel_fstreaminfo(struct vfs_handle_struct *handle, return NT_STATUS_NOT_IMPLEMENTED; } -static int skel_get_real_filename(struct vfs_handle_struct *handle, - const struct smb_filename *path, - const char *name, - TALLOC_CTX *mem_ctx, char **found_name) +static NTSTATUS skel_get_real_filename(struct vfs_handle_struct *handle, + const struct smb_filename *path, + const char *name, + TALLOC_CTX *mem_ctx, + char **found_name) { - errno = ENOSYS; - return -1; + return NT_STATUS_NOT_IMPLEMENTED; } static const char *skel_connectpath(struct vfs_handle_struct *handle, diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index 5508e084abd..ecd3c282240 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -875,10 +875,11 @@ static NTSTATUS skel_fstreaminfo(struct vfs_handle_struct *handle, streams); } -static int skel_get_real_filename(struct vfs_handle_struct *handle, - const struct smb_filename *path, - const char *name, - TALLOC_CTX *mem_ctx, char **found_name) +static NTSTATUS skel_get_real_filename(struct vfs_handle_struct *handle, + const struct smb_filename *path, + const char *name, + TALLOC_CTX *mem_ctx, + char **found_name) { return SMB_VFS_NEXT_GET_REAL_FILENAME(handle, path, name, mem_ctx, found_name); |