From df269c0834a46bb0f0cf44d0f0822c05c8c797a5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 12 Apr 2011 16:32:37 -0700 Subject: Don't print "success" message after error message in change_file_owner_to_parent(). Remove "goto" in change_dir_owner_to_parent(). --- source3/smbd/open.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'source3') diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 5c449fcb86..66b14ff076 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -226,12 +226,12 @@ void change_file_owner_to_parent(connection_struct *conn, "was %s\n", fsp_str_dbg(fsp), (unsigned int)smb_fname_parent->st.st_ex_uid, strerror(errno) )); + } else { + DEBUG(10,("change_file_owner_to_parent: changed new file %s to " + "parent directory uid %u.\n", fsp_str_dbg(fsp), + (unsigned int)smb_fname_parent->st.st_ex_uid)); } - DEBUG(10,("change_file_owner_to_parent: changed new file %s to " - "parent directory uid %u.\n", fsp_str_dbg(fsp), - (unsigned int)smb_fname_parent->st.st_ex_uid)); - TALLOC_FREE(smb_fname_parent); } @@ -325,13 +325,12 @@ NTSTATUS change_dir_owner_to_parent(connection_struct *conn, "Error was %s\n", fname, (unsigned int)smb_fname_parent->st.st_ex_uid, strerror(errno) )); - goto chdir; + } else { + DEBUG(10,("change_dir_owner_to_parent: changed ownership of new " + "directory %s to parent directory uid %u.\n", + fname, (unsigned int)smb_fname_parent->st.st_ex_uid )); } - DEBUG(10,("change_dir_owner_to_parent: changed ownership of new " - "directory %s to parent directory uid %u.\n", - fname, (unsigned int)smb_fname_parent->st.st_ex_uid )); - chdir: vfs_ChDir(conn,saved_dir); out: -- cgit