From 9d5e026bde837ed853478a223e2823fd35c67d26 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2012 12:26:56 -0700 Subject: Make check_same_stat() and check_same_dev_ino() common functions. --- source3/smbd/open.c | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'source3/smbd/open.c') 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 @@ -39,20 +39,6 @@ struct deferred_open_record { struct file_id id; }; -/**************************************************************************** - 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 @@ -2750,21 +2736,6 @@ static NTSTATUS mkdir_internal(connection_struct *conn, return NT_STATUS_OK; } -/**************************************************************************** - 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. ****************************************************************************/ -- cgit