]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Simplify ad_get_internal()
authorVolker Lendecke <vl@samba.org>
Wed, 4 Dec 2024 18:37:20 +0000 (19:37 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 17 Dec 2024 12:30:31 +0000 (12:30 +0000)
We have metadata_fsp() for this

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
source3/lib/adouble.c

index 264e8f6901333197035982db18bf3e75be527273..71efa4a6a9f416cd46c405511937c76e5c029ddc 100644 (file)
@@ -2584,11 +2584,8 @@ static struct adouble *ad_get_internal(TALLOC_CTX *ctx,
        int mode;
 
        if (fsp != NULL) {
-               if (fsp_is_alternate_stream(fsp)) {
-                       smb_fname = fsp->base_fsp->fsp_name;
-               } else {
-                       smb_fname = fsp->fsp_name;
-               }
+               struct files_struct *meta_fsp = metadata_fsp(fsp);
+               smb_fname = meta_fsp->fsp_name;
        }
 
        DEBUG(10, ("ad_get(%s) called for %s\n",