summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-07-09 12:26:56 -0700
committerJeremy Allison <jra@samba.org>2012-07-09 12:26:56 -0700
commit9d5e026bde837ed853478a223e2823fd35c67d26 (patch)
tree0b41a219fcf07d086a52a72cd595bb63406c351c /source3/smbd
parent1f37ed7a5283ef3abd095d6a92efa231e7e2444d (diff)
downloadsamba-9d5e026bde837ed853478a223e2823fd35c67d26.tar.gz
samba-9d5e026bde837ed853478a223e2823fd35c67d26.tar.bz2
samba-9d5e026bde837ed853478a223e2823fd35c67d26.zip
Make check_same_stat() and check_same_dev_ino() common functions.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c29
-rw-r--r--source3/smbd/proto.h2
2 files changed, 0 insertions, 31 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 145a8a4e6a..88f779a527 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -40,20 +40,6 @@ struct deferred_open_record {
};
/****************************************************************************
- Check two stats have identical dev and ino fields.
-****************************************************************************/
-
-static bool check_same_dev_ino(const SMB_STRUCT_STAT *sbuf1,
- const SMB_STRUCT_STAT *sbuf2)
-{
- if (sbuf1->st_ex_dev != sbuf2->st_ex_dev ||
- sbuf1->st_ex_ino != sbuf2->st_ex_ino) {
- return false;
- }
- return true;
-}
-
-/****************************************************************************
If the requester wanted DELETE_ACCESS and was rejected because
the file ACL didn't include DELETE_ACCESS, see if the parent ACL
overrides this.
@@ -2751,21 +2737,6 @@ static NTSTATUS mkdir_internal(connection_struct *conn,
}
/****************************************************************************
- Ensure we didn't get symlink raced on opening a directory.
-****************************************************************************/
-
-bool check_same_stat(const SMB_STRUCT_STAT *sbuf1,
- const SMB_STRUCT_STAT *sbuf2)
-{
- if (sbuf1->st_ex_uid != sbuf2->st_ex_uid ||
- sbuf1->st_ex_gid != sbuf2->st_ex_gid ||
- !check_same_dev_ino(sbuf1, sbuf2)) {
- return false;
- }
- return true;
-}
-
-/****************************************************************************
Open a directory from an NT SMB call.
****************************************************************************/
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 4279755d66..725f89c229 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -620,8 +620,6 @@ bool is_deferred_open_async(const void *ptr);
NTSTATUS open_file_fchmod(connection_struct *conn,
struct smb_filename *smb_fname,
files_struct **result);
-bool check_same_stat(const SMB_STRUCT_STAT *sbuf1,
- const SMB_STRUCT_STAT *sbuf2);
NTSTATUS create_directory(connection_struct *conn, struct smb_request *req,
struct smb_filename *smb_dname);
void msg_file_was_renamed(struct messaging_context *msg,