diff options
author | Volker Lendecke <vl@samba.org> | 2016-06-13 16:12:54 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-07-20 05:21:06 +0200 |
commit | ea47abcf3c9e750fa6315ec1de0c18f9fb4faaeb (patch) | |
tree | 478536ee6ec2a5574641482a442c58148e0e19cf /source3 | |
parent | 2c7bfdc6445a82823f3876eafe22cd7ec8ae95a2 (diff) | |
download | samba-ea47abcf3c9e750fa6315ec1de0c18f9fb4faaeb.tar.gz |
smbd: Add fsp_fullbasepath
Okay, this is similar to full_path_tos, but with variable arrays now and much
simpler :-)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/files.c | 11 | ||||
-rw-r--r-- | source3/smbd/proto.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c index a3cce138e02..f211c17f5e9 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -780,3 +780,14 @@ uint32_t fsp_lease_type(struct files_struct *fsp) } return map_oplock_to_lease_type(fsp->oplock_type); } + +size_t fsp_fullbasepath(struct files_struct *fsp, char *buf, size_t buflen) +{ + int len; + + len = snprintf(buf, buflen, "%s/%s", fsp->conn->connectpath, + fsp->fsp_name->base_name); + SMB_ASSERT(len>0); + + return len; +} diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 86fafe59107..764673cf7f2 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -412,6 +412,7 @@ NTSTATUS fsp_set_smb_fname(struct files_struct *fsp, const struct smb_filename *smb_fname_in); const struct GUID *fsp_client_guid(const files_struct *fsp); uint32_t fsp_lease_type(struct files_struct *fsp); +size_t fsp_fullbasepath(struct files_struct *fsp, char *buf, size_t buflen); /* The following definitions come from smbd/ipc.c */ |