From 01a444b42255a98e892f4cbb29b88796285c6d36 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 12 Dec 2008 16:51:34 +0100 Subject: s3 sesssetup.c: Add missing line break to debug message. Karolin --- source3/smbd/sesssetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/smbd') diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 24a201013a..a24843ff64 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -915,7 +915,7 @@ static void reply_spnego_auth(struct smb_request *req, DEBUG(3,("reply_spnego_auth: network " "misconfiguration, client sent us a " "krb5 ticket and kerberos security " - "not enabled")); + "not enabled\n")); reply_nterror(req, nt_status_squash( NT_STATUS_LOGON_FAILURE)); SAFE_FREE(kerb_mech); -- cgit From 9391dad85d08bb0939f4db1472c6cf063ebea892 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 12 Dec 2008 13:47:41 +0100 Subject: Fix error code when smbclient puts a file over an existing directory Windows returns NT_STATUS_FILE_IS_A_DIRECTORY, as does Samba 3.0. 3.2 and following returned NT_STATUS_INVALID_PARAMETER which is wrong. Before I converted reply_open_and_X to create_file() we called open_file_ntcreate directly. Passing through open&X for a filename that exists as a directory ends up in open_directory after having tried open_file_ntcreate. Some check in there returns NT_STATUS_INVALID_PARAMETER. With this additional FILE_NON_DIRECTORY_FILE flag we get the correct error message back from create_file_unixpath before trying open_directory(). Survives make test, but as this also touches the other open variants I would like others to review this. Volker --- source3/smbd/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/smbd') diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 77ad1664ef..1e988f65ec 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1048,7 +1048,7 @@ bool map_open_params_to_ntcreate(const char *fname, int deny_mode, int open_func uint32 access_mask; uint32 share_mode; uint32 create_disposition; - uint32 create_options = 0; + uint32 create_options = FILE_NON_DIRECTORY_FILE; DEBUG(10,("map_open_params_to_ntcreate: fname = %s, deny_mode = 0x%x, " "open_func = 0x%x\n", -- cgit From 627c844a13caf869ae3c68ec780a8eded7cb181d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 13 Dec 2008 10:31:11 +0100 Subject: Fix a valgrind error in get_relative_fid_filename It doesn't really make sense to check the length of a not-yet-allocated string :-) Volker --- source3/smbd/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/smbd') diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 1e988f65ec..d22eda2bb5 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3067,7 +3067,7 @@ NTSTATUS get_relative_fid_filename(connection_struct *conn, files_struct *dir_fsp; char *parent_fname = NULL; - if (root_dir_fid == 0 || !fname || !new_fname || !*new_fname) { + if (root_dir_fid == 0 || !fname || !new_fname) { return NT_STATUS_INTERNAL_ERROR; } -- cgit