The branch, master has been updated
       via  8e65cc9777b vfs: Remove unused SMB_VFS_GETWD()
       via  84aff2e3d64 vfs_shadow_copy2: Remove special chdir-handling
       via  795d5343511 vfs_widelinks: Chdir never gets a relative path anymore
       via  53687896467 lib: Remove the "getwd cache"
       via  125c41a356f torture: Use SINGLETON_CACHE_TALLOC in tests
       via  4c8dad9a6f1 vfs: Remove callers of SMB_VFS_GETWD()
       via  3b093765911 vfs: Significantly simplify vfs_ChDir_shareroot()
       via  f3e655538a0 vfs: A connectpath is never "."
       via  894f8c9af0c vfs: Inline vfs_ChDir() into vfs_ChDir_shareroot()
       via  40b319cf686 smbd: Make vfs_GetWd() static to vfs.c
       via  da719890142 smbd: Inline print_impersonation_info()
       via  95202cbd88d smbd: Make vfs_ChDir() static
       via  7e7e09c8ea6 vfstest: Remove the chdir/getwd commands
       via  03b36f368e4 smbd: Avoid the VFS' chdir() call in close_cnum()
       via  b27e39c9592 smbd: Remove unused create_conn_struct_tos()
       via  6e516572e18 fss_srv: Use create_conn_struct_chdir()
       via  bd87333d6e2 smbd: Remove unused create_conn_struct_tos_cwd()
       via  aa123c8516e smbd: Call create_conn_struct_chdir() in 
get_referred_path()
       via  adae659a400 dfssrv: Call create_conn_struct_chdir()
       via  972a2e27280 srvsvc: Call create_conn_struct_chdir()
       via  3dc246b3104 eventlog: Use create_conn_struct_chdir()
       via  db1a0480a5e printing: Call create_conn_struct_chdir()
       via  ac89da0538a net: Use create_conn_struct_chdir() in "net vfs"
       via  d11d3a18d53 pysmbd: Use create_conn_struct_chdir()
       via  d9ae66d401f vfstest: Use create_conn_struct_chdir()
       via  b708c35866e smbd: Remove unused create_conn_struct_cwd()
       via  79fcdac11e4 mdssvc: Use create_conn_struct_chdir()
       via  3c2bbb4ed81 smbd: Add create_conn_struct_chdir()
       via  335fa257502 smbd: Leave sconn->ev_ctx as NULL for internal fake 
connections
       via  f10fc1a2fef mdssvc: Align an integer type
       via  2f53408805c smbd: Remove a pointless TALLOC_FREE()
       via  0fb7364f8c5 smbd: Add vfs_ChDir_shareroot() wrapper
       via  eec81ce76ae printing: Streamline move_driver_to_download_area()
       via  f302720744b printing: Streamline delete_driver_files()
       via  efcd639af2f printing: Streamline get_correct_cversion()
       via  151d3a2f16e printing: Modernize DEBUGs
       via  ac9f285d971 rpc_server: Move dfs helper routines to srv_dfs_nt.c
      from  f5eb85e76fd s3/include: Remove unused BIG_UINT

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8e65cc9777b51db06f2fe62c6b5a9b3709e8e56b
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 17 12:22:12 2026 +0100

    vfs: Remove unused SMB_VFS_GETWD()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>
    
    Autobuild-User(master): Volker Lendecke <[email protected]>
    Autobuild-Date(master): Sun Mar  1 21:22:24 UTC 2026 on atb-devel-224

commit 84aff2e3d64504aca533079fbfa23329251f822b
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 17 12:03:45 2026 +0100

    vfs_shadow_copy2: Remove special chdir-handling
    
    With only changing into the share root, and the share root never being
    a @GMT-path or one with a twrp, we don't need special handling.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 795d5343511c69c8fd16edf2c71c8f34e965c006
Author: Volker Lendecke <[email protected]>
Date:   Tue Feb 17 11:22:13 2026 +0100

    vfs_widelinks: Chdir never gets a relative path anymore
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 5368789646793730f97b3759810c2f7a3510a95f
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 17:40:55 2026 +0100

    lib: Remove the "getwd cache"
    
    No longer needed
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 125c41a356f7dae2ae0c3dde19262ae717690972
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 17:38:02 2026 +0100

    torture: Use SINGLETON_CACHE_TALLOC in tests
    
    GETWD_CACHE is on its way out. Despite not having _TALLOC in its name
    nor it being marked as talloc in memcache.h, memcache_is_talloc()
    shows it as being talloc'ed.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 4c8dad9a6f1733150ba4a85f11003fbd0cf6b706
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 17:18:42 2026 +0100

    vfs: Remove callers of SMB_VFS_GETWD()
    
    We don't chdir() arbitrarily. We can reference conn->connectpath
    instead.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 3b09376591105f3c542141cad8280fc364b2a0bd
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 16:55:58 2026 +0100

    vfs: Significantly simplify vfs_ChDir_shareroot()
    
    Now that we are sure we don't chdir to arbitrary paths, and nobody
    except vfs_ChDir_shareroot() calls vfs_GetWd() anymore, we can get rid
    of the getwd cache and replace the LastDir-check with a simple
    
        if (conn == chdir_lastconn_cache) {
                return 0;
        }
    
    The places where we reset LastDir to NULL, forcing a real chdir, are
    replaced by a call to reset_chdir_lastconn_cache().
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit f3e655538a0d1cc4a271fdffe06146bba26b1f20
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 16:59:42 2026 +0100

    vfs: A connectpath is never "."
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 894f8c9af0c6b28ef9a419133574029989f31ef3
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 16:56:50 2026 +0100

    vfs: Inline vfs_ChDir() into vfs_ChDir_shareroot()
    
    vfs_ChDir_shareroot() was the only caller of vfs_ChDir()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 40b319cf6862a802d6654af4cae79d23288d4913
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 16:09:13 2026 +0100

    smbd: Make vfs_GetWd() static to vfs.c
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit da719890142dbb512c0595e3544832bc77224b43
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 16:05:31 2026 +0100

    smbd: Inline print_impersonation_info()
    
    With the fact that we only chdir() to the share root, we can directly
    print conn->connectpath and avoid a call to vfs_GetWd()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 95202cbd88d5a355229f4e6e515292046a630819
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 16:01:47 2026 +0100

    smbd: Make vfs_ChDir() static
    
    This makes it clear that we only ever chdir() to the root of a share.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 7e7e09c8ea66efbdcdd737e9e66ab8e3b50b0f60
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 15:23:42 2026 +0100

    vfstest: Remove the chdir/getwd commands
    
    Not called in test, remove them.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 03b36f368e4a46d13160a4715804ba1611f94c4d
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 15:19:49 2026 +0100

    smbd: Avoid the VFS' chdir() call in close_cnum()
    
    The purpose of this call here is to make a file system
    unmountable. For shares backed by a local file system, a direct
    chdir(2) syscall to "/" will achieve the same, and shares like cephfs
    backed by libraries without a local mount will not be affected
    anyway. For them, a VFS level chdir("/") relative to a connection does
    not make much sense anyway.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit b27e39c9592846f41b556c4fc8d16aa4bec0ee64
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 15:16:07 2026 +0100

    smbd: Remove unused create_conn_struct_tos()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 6e516572e18137fe73d56692000cfea55ed1bc49
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 15:12:59 2026 +0100

    fss_srv: Use create_conn_struct_chdir()
    
    This is the last user of the non-chdir create_conn_struct_tos(). While
    I don't fully understand the code, this is an RPC server that *should*
    not care about the current working directory. There are some tests for
    this in the rpc.fsrvp group of tests, so I don't think this breaks too
    badly.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit bd87333d6e2efce84fb4141c4cf3e687ddfa6cd0
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 14:21:17 2026 +0100

    smbd: Remove unused create_conn_struct_tos_cwd()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit aa123c8516ee1c364747cda3f8e4ab73d40d9b33
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 14:16:46 2026 +0100

    smbd: Call create_conn_struct_chdir() in get_referred_path()
    
    create_conn_struct_tos_cwd() provides an attempt to chdir() back to
    where we came from. This is flawed, because SMB_VFS_CHDIR() is always
    relative to a connection, and conn_struct_tos_destructor() calls
    vfs_ChDir() on the fake connection, not the one we came from.
    
    Remove the flawed attempt to chdir() back in get_referred_path(). The
    one caller in vfswrap_get_dfs_referrals() changes back to the "real"
    connection that issued the dfs call from SMB, and the RPC server
    callers don't care. They rely on the chdir("/") in
    conn_wrap_destructor().
    
    This adds one chdir("/") in smbd's "get referral" calls, but those
    should be rare enough not to cause performance problems.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit adae659a40004b12c9ae3716eaa30f7986c9bd7f
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 14:11:57 2026 +0100

    dfssrv: Call create_conn_struct_chdir()
    
    This is inside an rpc server, where we don't depend on an implicit
    current working directory. We don't need the "jump back to old cwd"
    that create_conn_struct_tos_cwd() provided.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 972a2e272807943b97cde006a7f7606ec8f19695
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 14:03:57 2026 +0100

    srvsvc: Call create_conn_struct_chdir()
    
    This is inside an rpc server, where we don't depend on an implicit
    current working directory. We don't need the "jump back to old cwd"
    that create_conn_struct_tos_cwd() provided.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 3dc246b3104f5569a82f005942f599005bb245d1
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 13:57:08 2026 +0100

    eventlog: Use create_conn_struct_chdir()
    
    I did not find any use of cwd-dependent calls in this code, the
    eventlog tdb's are all relative to state_path(), which is absolute. As
    this is in a rpc server we don't have to preserve any cwd.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit db1a0480a5e7754f5286156effe82ff1605d3a34
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 13:48:54 2026 +0100

    printing: Call create_conn_struct_chdir()
    
    This is only linked from rpcd_spoolss, where we don't depend on an
    implicit current working directory. We don't need the "jump back to
    old cwd" that create_conn_struct_tos_cwd() provided.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit ac89da0538a9ad5d0d1ebef47d03c0d3e83200e7
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 13:43:04 2026 +0100

    net: Use create_conn_struct_chdir() in "net vfs"
    
    We don't need to jump back to the previous cwd when exiting from the
    net vfs process.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit d11d3a18d539ce7583e947e8deadcc0794952574
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 13:14:24 2026 +0100

    pysmbd: Use create_conn_struct_chdir()
    
    pysmbd is the one user of fake connection_structs that depends on
    not changing to "/" after the connection has been torn down. Add
    special handling here.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit d9ae66d401f45dff43d03991957bf1e944167ee2
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 12:46:34 2026 +0100

    vfstest: Use create_conn_struct_chdir()
    
    We don't need to return to the old cwd when exiting the process.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit b708c35866ec2f411daa6f6472f8425cd262e4ae
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 12:43:12 2026 +0100

    smbd: Remove unused create_conn_struct_cwd()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 79fcdac11e45e0705dec5c31ed8707bfbb72ee9a
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 12:40:12 2026 +0100

    mdssvc: Use create_conn_struct_chdir()
    
    Simplify mdssvc by using create_conn_struct_chdir()'s destructor plus
    the vfs_ChDir_shareroot call.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 3c2bbb4ed81e28ed834ed0fca14488f6a270c5c5
Author: Volker Lendecke <[email protected]>
Date:   Mon Feb 16 12:36:25 2026 +0100

    smbd: Add create_conn_struct_chdir()
    
    This is supposed to replace create_conn_struct_tos() in the next patches. 
Stay
    tuned...
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 335fa257502c78a35953c748aeedc02401e4d824
Author: Volker Lendecke <[email protected]>
Date:   Thu Feb 12 20:54:54 2026 +0100

    smbd: Leave sconn->ev_ctx as NULL for internal fake connections
    
    These connection_structs are only there to access files like msdfs
    symlinks or printer driver files. They will never participate in async
    processing like sending out events or getting delayed for oplocks. Any
    such use is a bug, because if you look at create_conn_struct_tos() we
    create an event context that we will never poll on, so events posted
    there will never finish. Leave the ev_ctx NULL so that we get an early
    crash instead of running into problems later.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit f10fc1a2fefa2a96a490746761ddfbeac6ca09a9
Author: Volker Lendecke <[email protected]>
Date:   Thu Feb 12 20:31:19 2026 +0100

    mdssvc: Align an integer type
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 2f53408805cb01b8ea9f5b10788f5a0cf7b53af0
Author: Volker Lendecke <[email protected]>
Date:   Thu Feb 12 20:14:08 2026 +0100

    smbd: Remove a pointless TALLOC_FREE()
    
    This hangs off "c" anyway
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 0fb7364f8c51fafbf14ebcb78712e1e16f6d2090
Author: Volker Lendecke <[email protected]>
Date:   Thu Feb 12 20:01:48 2026 +0100

    smbd: Add vfs_ChDir_shareroot() wrapper
    
    Clarify where we just change to the root of the export.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit eec81ce76ae7ee22d9ad9627c3505786cff650bc
Author: Volker Lendecke <[email protected]>
Date:   Thu Feb 12 18:48:03 2026 +0100

    printing: Streamline move_driver_to_download_area()
    
    Centralize cleanup
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit f302720744b195de04be72bf8a2230ceaef7cf1d
Author: Volker Lendecke <[email protected]>
Date:   Thu Feb 12 14:43:57 2026 +0100

    printing: Streamline delete_driver_files()
    
    Centralize cleanup
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit efcd639af2f79d1d7e0ba65a0808add2e673da38
Author: Volker Lendecke <[email protected]>
Date:   Thu Feb 12 13:01:30 2026 +0100

    printing: Streamline get_correct_cversion()
    
    Make it return WERROR, centralize cleanup at the end of the function.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 151d3a2f16ed237eef47878846e992109b1bbd39
Author: Volker Lendecke <[email protected]>
Date:   Thu Feb 12 10:49:28 2026 +0100

    printing: Modernize DEBUGs
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit ac9f285d971f424dc641c474ee3c744b27a13fb6
Author: Volker Lendecke <[email protected]>
Date:   Wed Feb 11 18:25:30 2026 +0100

    rpc_server: Move dfs helper routines to srv_dfs_nt.c
    
    This makes it clear that these callers of create_conn_struct_tos_cwd()
    don't really need to chdir() back to whatever cwd the process was in
    before. RPC servers don't really have a concept of "implicit" current
    working directory that is assumed to be the root dir of the current
    share.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/manpages/vfs_full_audit.8.xml        |   1 -
 docs-xml/smbdotconf/tuning/getwdcache.xml     |  13 -
 examples/VFS/skel_opaque.c                    |   8 -
 examples/VFS/skel_transparent.c               |   7 -
 lib/param/loadparm.c                          |   2 -
 lib/util/memcache.c                           |   1 -
 lib/util/memcache.h                           |   1 -
 lib/util/tests/test_memcache.c                |  24 +-
 source3/include/smbprofile.h                  |   2 -
 source3/include/vfs.h                         |   7 +-
 source3/include/vfs_macros.h                  |   5 -
 source3/modules/vfs_ceph.c                    |   9 -
 source3/modules/vfs_ceph_new.c                |  20 -
 source3/modules/vfs_default.c                 |  32 +-
 source3/modules/vfs_full_audit.c              |  19 -
 source3/modules/vfs_glusterfs.c               |  20 -
 source3/modules/vfs_not_implemented.c         |   9 -
 source3/modules/vfs_shadow_copy2.c            | 103 +---
 source3/modules/vfs_time_audit.c              |  20 -
 source3/modules/vfs_widelinks.c               |  61 +--
 source3/param/loadparm.c                      |   1 -
 source3/printing/nt_printing.c                | 305 +++++------
 source3/rpc_server/dfs/srv_dfs_nt.c           | 501 ++++++++++++++++++
 source3/rpc_server/eventlog/srv_eventlog_nt.c |  39 +-
 source3/rpc_server/fss/srv_fss_agent.c        |  21 +-
 source3/rpc_server/mdssvc/mdssvc.c            |  47 +-
 source3/rpc_server/mdssvc/mdssvc.h            |   1 +
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c     |  30 +-
 source3/rpc_server/wscript_build              |   2 +-
 source3/smbd/conn.c                           |   2 +
 source3/smbd/globals.c                        |   1 -
 source3/smbd/globals.h                        |   1 -
 source3/smbd/msdfs.c                          | 734 +++-----------------------
 source3/smbd/proto.h                          |  53 +-
 source3/smbd/pysmbd.c                         |  81 +--
 source3/smbd/sec_ctx.c                        |   2 +-
 source3/smbd/smb2_oplock.c                    |   6 +-
 source3/smbd/smb2_service.c                   |  12 +-
 source3/smbd/uid.c                            |  29 +-
 source3/smbd/vfs.c                            | 239 +--------
 source3/torture/cmd_vfs.c                     |  19 -
 source3/torture/torture.c                     |  22 +-
 source3/torture/vfstest.c                     |  15 +-
 source3/utils/net_vfs.c                       |  29 +-
 44 files changed, 942 insertions(+), 1614 deletions(-)
 delete mode 100644 docs-xml/smbdotconf/tuning/getwdcache.xml


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_full_audit.8.xml 
b/docs-xml/manpages/vfs_full_audit.8.xml
index 90989fbabf4..58e2ea30166 100644
--- a/docs-xml/manpages/vfs_full_audit.8.xml
+++ b/docs-xml/manpages/vfs_full_audit.8.xml
@@ -89,7 +89,6 @@
        <member>get_real_filename</member>
        <member>get_real_filename_at</member>
        <member>get_shadow_copy_data</member>
-       <member>getwd</member>
        <member>getxattrat_recv</member>
        <member>getxattrat_send</member>
        <member>is_offline</member>
diff --git a/docs-xml/smbdotconf/tuning/getwdcache.xml 
b/docs-xml/smbdotconf/tuning/getwdcache.xml
deleted file mode 100644
index ec4d9ed51a9..00000000000
--- a/docs-xml/smbdotconf/tuning/getwdcache.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<samba:parameter name="getwd cache"
-                 context="G"
-                 type="boolean"
-                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc";>
-<description>
-    <para>This is a tuning option. When this is enabled a 
-    caching algorithm will be used to reduce the time taken for getwd() 
-    calls. This can have a significant impact on performance, especially 
-    when the <smbconfoption name="wide links"/> parameter is set to 
<constant>no</constant>.</para>
-</description>
-
-<value type="default">yes</value>
-</samba:parameter>
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 9571eb9244d..5d90f6c27cb 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -410,13 +410,6 @@ static int skel_chdir(vfs_handle_struct *handle,
        return -1;
 }
 
-static struct smb_filename *skel_getwd(vfs_handle_struct *handle,
-                               TALLOC_CTX *ctx)
-{
-       errno = ENOSYS;
-       return NULL;
-}
-
 static int skel_fntimes(vfs_handle_struct *handle,
                        files_struct *fsp,
                        struct smb_file_time *ft)
@@ -1009,7 +1002,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
        .fchown_fn = skel_fchown,
        .lchown_fn = skel_lchown,
        .chdir_fn = skel_chdir,
-       .getwd_fn = skel_getwd,
        .fntimes_fn = skel_fntimes,
        .ftruncate_fn = skel_ftruncate,
        .fallocate_fn = skel_fallocate,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index aa186d7ef17..ad85032ba51 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -532,12 +532,6 @@ static int skel_chdir(vfs_handle_struct *handle,
        return SMB_VFS_NEXT_CHDIR(handle, smb_fname);
 }
 
-static struct smb_filename *skel_getwd(vfs_handle_struct *handle,
-                                       TALLOC_CTX *ctx)
-{
-       return SMB_VFS_NEXT_GETWD(handle, ctx);
-}
-
 static int skel_fntimes(vfs_handle_struct *handle,
                        files_struct *fsp,
                        struct smb_file_time *ft)
@@ -1319,7 +1313,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
        .fchown_fn = skel_fchown,
        .lchown_fn = skel_lchown,
        .chdir_fn = skel_chdir,
-       .getwd_fn = skel_getwd,
        .fntimes_fn = skel_fntimes,
        .ftruncate_fn = skel_ftruncate,
        .fallocate_fn = skel_fallocate,
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index e3d9a0a0e5a..ebf8a047af0 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -3025,8 +3025,6 @@ struct loadparm_context *loadparm_init(TALLOC_CTX 
*mem_ctx)
 
        lpcfg_do_global_parameter(lp_ctx, "deadtime", "10080");
 
-       lpcfg_do_global_parameter(lp_ctx, "getwd cache", "True");
-
        lpcfg_do_global_parameter(lp_ctx, "winbind nested groups", "True");
 
        lpcfg_do_global_parameter(lp_ctx, "mangled names", "illegal");
diff --git a/lib/util/memcache.c b/lib/util/memcache.c
index 98e317c66fb..a9f814ff65c 100644
--- a/lib/util/memcache.c
+++ b/lib/util/memcache.c
@@ -59,7 +59,6 @@ static bool memcache_is_talloc(enum memcache_number n)
        case PDB_GETPWSID_CACHE:
        case SINGLETON_CACHE_TALLOC:
        case SHARE_MODE_LOCK_CACHE:
-       case GETWD_CACHE:
        case VIRUSFILTER_SCAN_RESULTS_CACHE_TALLOC:
                result = true;
                break;
diff --git a/lib/util/memcache.h b/lib/util/memcache.h
index 6986760b8ce..fca9d3b4440 100644
--- a/lib/util/memcache.h
+++ b/lib/util/memcache.h
@@ -37,7 +37,6 @@ struct memcache;
 enum memcache_number {
        STAT_CACHE,
        GETREALFILENAME_CACHE,
-       GETWD_CACHE,
        GETPWNAM_CACHE,         /* talloc */
        MANGLE_HASH2_CACHE,
        PDB_GETPWSID_CACHE,     /* talloc */
diff --git a/lib/util/tests/test_memcache.c b/lib/util/tests/test_memcache.c
index 8a3997817c1..3de17f5a19f 100644
--- a/lib/util/tests/test_memcache.c
+++ b/lib/util/tests/test_memcache.c
@@ -76,26 +76,26 @@ static void torture_memcache_add_lookup_delete(void **state)
        path2 = talloc_strdup(mem_ctx, "/tmp/two");
        assert_non_null(path1);
 
-       memcache_add_talloc(cache, GETWD_CACHE, key1, &path1);
+       memcache_add_talloc(cache, SINGLETON_CACHE_TALLOC, key1, &path1);
        assert_null(path1);
 
-       memcache_add_talloc(cache, GETWD_CACHE, key2, &path2);
+       memcache_add_talloc(cache, SINGLETON_CACHE_TALLOC, key2, &path2);
        assert_null(path2);
 
-       path1 = memcache_lookup_talloc(cache, GETWD_CACHE, key1);
+       path1 = memcache_lookup_talloc(cache, SINGLETON_CACHE_TALLOC, key1);
        assert_non_null(path1);
        assert_string_equal(path1, "/tmp/one");
 
-       path2 = memcache_lookup_talloc(cache, GETWD_CACHE, key2);
+       path2 = memcache_lookup_talloc(cache, SINGLETON_CACHE_TALLOC, key2);
        assert_non_null(path2);
        assert_string_equal(path2, "/tmp/two");
 
-       memcache_delete(cache, GETWD_CACHE, key1);
-       path1 = memcache_lookup_talloc(cache, GETWD_CACHE, key1);
+       memcache_delete(cache, SINGLETON_CACHE_TALLOC, key1);
+       path1 = memcache_lookup_talloc(cache, SINGLETON_CACHE_TALLOC, key1);
        assert_null(path1);
 
-       memcache_flush(cache, GETWD_CACHE);
-       path2 = memcache_lookup_talloc(cache, GETWD_CACHE, key2);
+       memcache_flush(cache, SINGLETON_CACHE_TALLOC);
+       path2 = memcache_lookup_talloc(cache, SINGLETON_CACHE_TALLOC, key2);
        assert_null(path2);
 
        TALLOC_FREE(path1);
@@ -121,16 +121,16 @@ static void torture_memcache_add_oversize(void **state)
        path2 = talloc_strdup(mem_ctx, "/tmp/two");
        assert_non_null(path1);
 
-       memcache_add_talloc(cache, GETWD_CACHE, key1, &path1);
+       memcache_add_talloc(cache, SINGLETON_CACHE_TALLOC, key1, &path1);
        assert_null(path1);
 
-       memcache_add_talloc(cache, GETWD_CACHE, key2, &path2);
+       memcache_add_talloc(cache, SINGLETON_CACHE_TALLOC, key2, &path2);
        assert_null(path2);
 
-       path1 = memcache_lookup_talloc(cache, GETWD_CACHE, key1);
+       path1 = memcache_lookup_talloc(cache, SINGLETON_CACHE_TALLOC, key1);
        assert_null(path1);
 
-       path2 = memcache_lookup_talloc(cache, GETWD_CACHE, key2);
+       path2 = memcache_lookup_talloc(cache, SINGLETON_CACHE_TALLOC, key2);
        assert_non_null(path2);
        assert_string_equal(path2, "/tmp/two");
 
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index f41f6c5c11c..d636f6e1ecb 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -88,7 +88,6 @@ struct tevent_context;
        SMBPROFILE_STATS_BASIC(syscall_fchown) \
        SMBPROFILE_STATS_BASIC(syscall_lchown) \
        SMBPROFILE_STATS_BASIC(syscall_chdir) \
-       SMBPROFILE_STATS_BASIC(syscall_getwd) \
        SMBPROFILE_STATS_BASIC(syscall_fntimes) \
        SMBPROFILE_STATS_BASIC(syscall_ftruncate) \
        SMBPROFILE_STATS_BASIC(syscall_fallocate) \
@@ -291,7 +290,6 @@ struct tevent_context;
        SMBPROFILE_STATS_BASIC(syscall_fchown) \
        SMBPROFILE_STATS_BASIC(syscall_lchown) \
        SMBPROFILE_STATS_BASIC(syscall_chdir) \
-       SMBPROFILE_STATS_BASIC(syscall_getwd) \
        SMBPROFILE_STATS_BASIC(syscall_fntimes) \
        SMBPROFILE_STATS_BASIC(syscall_ftruncate) \
        SMBPROFILE_STATS_BASIC(syscall_fallocate) \
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 92142cf8184..a9a121b7b14 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -403,6 +403,7 @@
  * Version 53 - Remove statvfs
  * Version 53 - Change GET_QUOTA to take a fsp instead of a name
  * Version 53 - Add fsp to SET_QUOTA
+ * Version 53 - Remove GETWD
  */
 
 #define SMB_VFS_INTERFACE_VERSION 53
@@ -1123,8 +1124,6 @@ struct vfs_fn_pointers {
                        gid_t gid);
        int (*chdir_fn)(struct vfs_handle_struct *handle,
                         const struct smb_filename *smb_fname);
-       struct smb_filename *(*getwd_fn)(struct vfs_handle_struct *handle,
-                               TALLOC_CTX *mem_ctx);
        int (*fntimes_fn)(struct vfs_handle_struct *handle,
                          struct files_struct *fsp,
                          struct smb_file_time *ft);
@@ -1609,8 +1608,6 @@ int smb_vfs_call_lchown(struct vfs_handle_struct *handle,
                        gid_t gid);
 int smb_vfs_call_chdir(struct vfs_handle_struct *handle,
                        const struct smb_filename *smb_fname);
-struct smb_filename *smb_vfs_call_getwd(struct vfs_handle_struct *handle,
-                               TALLOC_CTX *ctx);
 int smb_vfs_call_ntimes(struct vfs_handle_struct *handle,
                        const struct smb_filename *smb_fname,
                        struct smb_file_time *ft);
@@ -2042,8 +2039,6 @@ int vfs_not_implemented_lchown(vfs_handle_struct *handle,
                               gid_t gid);
 int vfs_not_implemented_chdir(vfs_handle_struct *handle,
                              const struct smb_filename *smb_fname);
-struct smb_filename *vfs_not_implemented_getwd(vfs_handle_struct *handle,
-                                              TALLOC_CTX *ctx);
 int vfs_not_implemented_ntimes(vfs_handle_struct *handle,
                               const struct smb_filename *smb_fname,
                               struct smb_file_time *ft);
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 70c780f679f..d338ad15374 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -290,11 +290,6 @@
 #define SMB_VFS_NEXT_CHDIR(handle, smb_fname) \
        smb_vfs_call_chdir((handle)->next, (smb_fname))
 
-#define SMB_VFS_GETWD(conn, ctx) \
-       smb_vfs_call_getwd((conn)->vfs_handles, (ctx))
-#define SMB_VFS_NEXT_GETWD(handle, ctx) \
-       smb_vfs_call_getwd((handle)->next, (ctx))
-
 #define SMB_VFS_FNTIMES(fsp, ts) \
        smb_vfs_call_fntimes((fsp)->conn->vfs_handles, (fsp), (ts))
 #define SMB_VFS_NEXT_FNTIMES(handle, fsp, ts) \
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 3850a61ae63..bb583861d65 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -1135,14 +1135,6 @@ static int cephwrap_chdir(struct vfs_handle_struct 
*handle,
        return status_code(result);
 }
 
-static struct smb_filename *cephwrap_getwd(struct vfs_handle_struct *handle,
-                       TALLOC_CTX *ctx)
-{
-       const char *cwd = ceph_getcwd(handle->data);
-       DBG_DEBUG("[CEPH] getwd(%p) = %s\n", handle, cwd);
-       return cp_smb_basename(ctx, cwd);
-}
-
 static int strict_allocate_ftruncate(struct vfs_handle_struct *handle,
                                     files_struct *fsp,
                                     off_t len)
@@ -1826,7 +1818,6 @@ static struct vfs_fn_pointers ceph_fns = {
        .fchown_fn = cephwrap_fchown,
        .lchown_fn = cephwrap_lchown,
        .chdir_fn = cephwrap_chdir,
-       .getwd_fn = cephwrap_getwd,
        .fntimes_fn = cephwrap_fntimes,
        .ftruncate_fn = cephwrap_ftruncate,
        .fallocate_fn = cephwrap_fallocate,
diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c
index eafce7b30ce..3d59eacb874 100644
--- a/source3/modules/vfs_ceph_new.c
+++ b/source3/modules/vfs_ceph_new.c
@@ -3791,25 +3791,6 @@ out:
        return status_code(result);
 }
 
-static struct smb_filename *vfs_ceph_getwd(struct vfs_handle_struct *handle,
-                       TALLOC_CTX *ctx)
-{
-       const char *cwd = NULL;
-       struct vfs_ceph_config *config = NULL;
-       struct smb_filename *result = NULL;
-
-       START_PROFILE_X(SNUM(handle->conn), syscall_getwd);
-       SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
-                               goto out);
-
-       cwd = config->ceph_getcwd_fn(config->mount);
-       DBG_DEBUG("[CEPH] getwd: cwd=%s\n", cwd);
-       result = cp_smb_basename(ctx, cwd);
-out:
-       END_PROFILE_X(syscall_getwd);
-       return result;
-}
-
 static int strict_allocate_ftruncate(struct vfs_handle_struct *handle,
                                     files_struct *fsp,
                                     off_t len)
@@ -4653,7 +4634,6 @@ static struct vfs_fn_pointers ceph_new_fns = {
        .fchown_fn = vfs_ceph_fchown,
        .lchown_fn = vfs_ceph_lchown,
        .chdir_fn = vfs_ceph_chdir,
-       .getwd_fn = vfs_ceph_getwd,
        .fntimes_fn = vfs_ceph_fntimes,
        .ftruncate_fn = vfs_ceph_ftruncate,
        .fallocate_fn = vfs_ceph_fallocate,
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 21fab6c5d31..fd3be0ef1da 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -242,13 +242,7 @@ static NTSTATUS vfswrap_get_dfs_referrals(struct 
vfs_handle_struct *handle,
                                   handle->conn->sconn->remote_address,
                                   handle->conn->sconn->local_address,
                                   junction, &consumedcnt, &self_referral);
-
-       {
-               struct smb_filename connectpath_fname = {
-                       .base_name = handle->conn->connectpath
-               };
-               vfs_ChDir(handle->conn, &connectpath_fname);
-       }
+       vfs_ChDir_shareroot(handle->conn);
 
        if (!NT_STATUS_IS_OK(status)) {
                return status;
@@ -2872,29 +2866,6 @@ static int vfswrap_chdir(vfs_handle_struct *handle,
        return result;
 }
 
-static struct smb_filename *vfswrap_getwd(vfs_handle_struct *handle,
-                               TALLOC_CTX *ctx)
-{
-       char *result;
-       struct smb_filename *smb_fname = NULL;
-
-       START_PROFILE_X(SNUM(handle->conn), syscall_getwd);
-       result = sys_getwd();
-       END_PROFILE_X(syscall_getwd);
-
-       if (result == NULL) {
-               return NULL;
-       }
-       smb_fname = cp_smb_basename(ctx, result);
-       /*
-        * sys_getwd() *always* returns malloced memory.
-        * We must free here to avoid leaks:
-        * BUG:https://bugzilla.samba.org/show_bug.cgi?id=13372
-        */
-       SAFE_FREE(result);
-       return smb_fname;
-}
-
 /*********************************************************************
  nsec timestamp resolution call. Convert down to whatever the underlying
  system will support.
@@ -4103,7 +4074,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
        .fchown_fn = vfswrap_fchown,
        .lchown_fn = vfswrap_lchown,
        .chdir_fn = vfswrap_chdir,
-       .getwd_fn = vfswrap_getwd,
        .fntimes_fn = vfswrap_fntimes,
        .ftruncate_fn = vfswrap_ftruncate,
        .fallocate_fn = vfswrap_fallocate,
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index f2aea7e6a74..a80ba8e60bf 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -146,7 +146,6 @@ typedef enum _vfs_op_type {
        SMB_VFS_OP_FCHOWN,
        SMB_VFS_OP_LCHOWN,
        SMB_VFS_OP_CHDIR,
-       SMB_VFS_OP_GETWD,
        SMB_VFS_OP_NTIMES,
        SMB_VFS_OP_FNTIMES,
        SMB_VFS_OP_FTRUNCATE,
@@ -281,7 +280,6 @@ static struct {
        { SMB_VFS_OP_FCHOWN,    "fchown" },
        { SMB_VFS_OP_LCHOWN,    "lchown" },
        { SMB_VFS_OP_CHDIR,     "chdir" },
-       { SMB_VFS_OP_GETWD,     "getwd" },
        { SMB_VFS_OP_NTIMES,    "ntimes" },
        { SMB_VFS_OP_FNTIMES,   "fntimes" },
        { SMB_VFS_OP_FTRUNCATE, "ftruncate" },
@@ -1857,22 +1855,6 @@ static int smb_full_audit_chdir(vfs_handle_struct 
*handle,
        return result;
 }
 
-static struct smb_filename *smb_full_audit_getwd(vfs_handle_struct *handle,
-                               TALLOC_CTX *ctx)
-{
-       struct smb_filename *result;
-
-       result = SMB_VFS_NEXT_GETWD(handle, ctx);
-
-       do_log(SMB_VFS_OP_GETWD,
-              result == NULL ? strerror(errno) : NULL,
-              handle,
-              "%s",
-              result == NULL ? "" : result->base_name);
-
-       return result;
-}
-
 static int smb_full_audit_fntimes(vfs_handle_struct *handle,
                                  files_struct *fsp,
                                  struct smb_file_time *ft)
@@ -3186,7 +3168,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
        .fchown_fn = smb_full_audit_fchown,
        .lchown_fn = smb_full_audit_lchown,
        .chdir_fn = smb_full_audit_chdir,
-       .getwd_fn = smb_full_audit_getwd,
        .fntimes_fn = smb_full_audit_fntimes,
        .ftruncate_fn = smb_full_audit_ftruncate,
        .fallocate_fn = smb_full_audit_fallocate,
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 212cd081e8c..4f02164103e 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1698,25 +1698,6 @@ static int vfs_gluster_chdir(struct vfs_handle_struct 
*handle,
        return ret;
 }
 
-static struct smb_filename *vfs_gluster_getwd(struct vfs_handle_struct *handle,
-                               TALLOC_CTX *ctx)
-{
-       char cwd[PATH_MAX] = { '\0' };
-       char *ret;
-       struct smb_filename *smb_fname = NULL;
-
-       START_PROFILE(syscall_getwd);
-
-       ret = glfs_getcwd(handle->data, cwd, PATH_MAX - 1);
-       END_PROFILE(syscall_getwd);
-
-       if (ret == NULL) {
-               return NULL;
-       }
-       smb_fname = cp_smb_basename(ctx, ret);
-       return smb_fname;
-}
-
 static int vfs_gluster_fntimes(struct vfs_handle_struct *handle,
                               files_struct *fsp,
                               struct smb_file_time *ft)
@@ -2613,7 +2594,6 @@ static struct vfs_fn_pointers glusterfs_fns = {
        .fchown_fn = vfs_gluster_fchown,
        .lchown_fn = vfs_gluster_lchown,
        .chdir_fn = vfs_gluster_chdir,
-       .getwd_fn = vfs_gluster_getwd,
        .fntimes_fn = vfs_gluster_fntimes,
        .ftruncate_fn = vfs_gluster_ftruncate,
        .fallocate_fn = vfs_gluster_fallocate,
diff --git a/source3/modules/vfs_not_implemented.c 
b/source3/modules/vfs_not_implemented.c
index 839844cd352..c256e2ba457 100644
--- a/source3/modules/vfs_not_implemented.c
+++ b/source3/modules/vfs_not_implemented.c
@@ -445,14 +445,6 @@ int vfs_not_implemented_chdir(vfs_handle_struct *handle,
        return -1;
 }
 
-_PUBLIC_
-struct smb_filename *vfs_not_implemented_getwd(vfs_handle_struct *handle,
-                                              TALLOC_CTX *ctx)
-{
-       errno = ENOSYS;
-       return NULL;
-}
-
 _PUBLIC_
 int vfs_not_implemented_fntimes(vfs_handle_struct *handle,
                                files_struct *fsp,
@@ -1103,7 +1095,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
        .fchown_fn = vfs_not_implemented_fchown,
        .lchown_fn = vfs_not_implemented_lchown,
        .chdir_fn = vfs_not_implemented_chdir,
-       .getwd_fn = vfs_not_implemented_getwd,
        .fntimes_fn = vfs_not_implemented_fntimes,
        .ftruncate_fn = vfs_not_implemented_ftruncate,
        .fallocate_fn = vfs_not_implemented_fallocate,
diff --git a/source3/modules/vfs_shadow_copy2.c 
b/source3/modules/vfs_shadow_copy2.c
index 2c1d3072d49..0c47f09268b 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -79,8 +79,6 @@ struct shadow_copy2_private {
        char *shadow_cwd; /* Absolute $cwd path. */
        /* Absolute connectpath - can vary depending on $cwd. */
        char *shadow_connectpath;


-- 
Samba Shared Repository


Reply via email to