2 * Unix SMB/Netbios implementation.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef _SOURCE3_SMBD_DIR_H_
19 #define _SOURCE3_SMBD_DIR_H_
26 NTSTATUS
can_delete_directory_fsp(files_struct
*fsp
);
27 struct files_struct
*dir_hnd_fetch_fsp(struct smb_Dir
*dir_hnd
);
28 uint16_t dptr_attr(struct smbd_server_connection
*sconn
, int key
);
29 bool dptr_case_sensitive(struct dptr_struct
*dptr
);
30 void dptr_closecnum(connection_struct
*conn
);
31 void dptr_CloseDir(files_struct
*fsp
);
32 NTSTATUS
dptr_create(connection_struct
*conn
,
33 struct smb_request
*req
,
38 struct dptr_struct
**dptr_ret
);
39 int dptr_dnum(struct dptr_struct
*dptr
);
40 files_struct
*dptr_fetch_lanman2_fsp(struct smbd_server_connection
*sconn
,
42 unsigned int dptr_FileNumber(struct dptr_struct
*dptr
);
43 bool dptr_get_priv(struct dptr_struct
*dptr
);
44 bool dptr_has_wild(struct dptr_struct
*dptr
);
45 const char *dptr_path(struct smbd_server_connection
*sconn
, int key
);
46 char *dptr_ReadDirName(TALLOC_CTX
*ctx
, struct dptr_struct
*dptr
);
47 void dptr_RewindDir(struct dptr_struct
*dptr
);
48 void dptr_set_priv(struct dptr_struct
*dptr
);
49 const char *dptr_wcard(struct smbd_server_connection
*sconn
, int key
);
50 bool have_file_open_below(connection_struct
*conn
,
51 const struct smb_filename
*name
);
52 bool init_dptrs(struct smbd_server_connection
*sconn
);
53 bool is_visible_fsp(files_struct
*fsp
);
54 NTSTATUS
OpenDir(TALLOC_CTX
*mem_ctx
,
55 connection_struct
*conn
,
56 const struct smb_filename
*smb_dname
,
59 struct smb_Dir
**_dir_hnd
);
60 NTSTATUS
OpenDir_from_pathref(TALLOC_CTX
*mem_ctx
,
61 struct files_struct
*dirfsp
,
64 struct smb_Dir
**_dir_hnd
);
65 const char *ReadDirName(struct smb_Dir
*dir_hnd
, char **talloced
);
66 void RewindDir(struct smb_Dir
*dir_hnd
);
67 bool smbd_dirptr_get_entry(TALLOC_CTX
*ctx
,
68 struct dptr_struct
*dirptr
,
74 bool (*match_fn
)(TALLOC_CTX
*ctx
,
81 struct smb_filename
**_smb_fname
,
83 char *smbd_dirptr_get_last_name_sent(struct dptr_struct
*dirptr
);
84 void smbd_dirptr_push_overflow(struct dptr_struct
*dirptr
,
86 struct smb_filename
**_smb_fname
,
88 void smbd_dirptr_set_last_name_sent(struct dptr_struct
*dirptr
, char **_fname
);