s3-auth: Split out get_user_sid_info3_and_extra() from create_local_nt_token_from_info3()
[amitay/samba.git] / source3 / modules / vfs_recycle.c
index ca3fc2ee5f41333ee6de0b85cc41f6063fda47f2..dfc3b9cc0f352f841c48c3f11d86f73fee191653 100644 (file)
@@ -186,10 +186,12 @@ static mode_t recycle_subdir_mode(vfs_handle_struct *handle)
 
 static bool recycle_directory_exist(vfs_handle_struct *handle, const char *dname)
 {
-       SMB_STRUCT_STAT st;
+       struct smb_filename smb_fname = {
+                       .base_name = discard_const_p(char, dname)
+       };
 
-       if (vfs_stat_smb_basename(handle->conn, dname, &st) == 0) {
-               if (S_ISDIR(st.st_ex_mode)) {
+       if (SMB_VFS_STAT(handle->conn, &smb_fname) == 0) {
+               if (S_ISDIR(smb_fname.st.st_ex_mode)) {
                        return True;
                }
        }