summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-17 02:44:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:13 -0500
commit60c1a8e5a8f905a5ae703dac05ed2f440875ad5d (patch)
treeaf515678982189249c1403a17559ada3138acaf6 /source3
parent83eb0d1d6d90d182e8eee8496695113c89f8dba1 (diff)
downloadsamba-60c1a8e5a8f905a5ae703dac05ed2f440875ad5d.tar.gz
samba-60c1a8e5a8f905a5ae703dac05ed2f440875ad5d.tar.bz2
samba-60c1a8e5a8f905a5ae703dac05ed2f440875ad5d.zip
r20845: Somehow I missed this one - should have been part of the
previous commit :-(. Jeremy. (This used to be commit 8fe3829e8a884ce2ddb91121d46b7a3a385874c1)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/open.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index bccc91bbd3..49dfad3bc0 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1189,8 +1189,9 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
remove_deferred_open_smb_message(mid);
}
- if (!check_name(fname,conn)) {
- return map_nt_error_from_unix(errno);
+ status = check_name(conn, fname);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
}
new_dos_attributes &= SAMBA_ATTRIBUTES_MASK;
@@ -1885,6 +1886,7 @@ static NTSTATUS mkdir_internal(connection_struct *conn, const char *name,
mode_t mode;
char *parent_dir;
const char *dirname;
+ NTSTATUS status;
if(!CAN_WRITE(conn)) {
DEBUG(5,("mkdir_internal: failing create on read-only share "
@@ -1892,8 +1894,9 @@ static NTSTATUS mkdir_internal(connection_struct *conn, const char *name,
return NT_STATUS_ACCESS_DENIED;
}
- if (!check_name(name, conn)) {
- return map_nt_error_from_unix(errno);
+ status = check_name(conn, name);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
}
if (!parent_dirname_talloc(tmp_talloc_ctx(), name, &parent_dir,