summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-09 18:33:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:32 -0500
commit257d2e0d2a6cd4c2ea62399ec97ada46dd8c395c (patch)
tree0f8a053523bcc4ac424b020ed0fd58614e4350a0 /source3/smbd
parent10820162f1cfbfd77fae84327c21d81ff8a6881c (diff)
downloadsamba-257d2e0d2a6cd4c2ea62399ec97ada46dd8c395c.tar.gz
samba-257d2e0d2a6cd4c2ea62399ec97ada46dd8c395c.tar.bz2
samba-257d2e0d2a6cd4c2ea62399ec97ada46dd8c395c.zip
r21777: As Stevef requested and the Apple guys agreed, make
mode_t in posix_open/posix_mkdir -> 8 bytes to match the SET_UNIX_INFO_BASIC call. Steve is updating the Wikki. Jeremy. (This used to be commit 2f1c95ac7718c1d2a75367ba712edd6b57069432)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index a298a258f0..5401aac15d 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5229,11 +5229,13 @@ static NTSTATUS smb_posix_mkdir(connection_struct *conn,
uint16 info_level_return = 0;
char *pdata = *ppdata;
- if (total_data < 10) {
+ if (total_data < 18) {
return NT_STATUS_INVALID_PARAMETER;
}
raw_unixmode = IVAL(pdata,8);
+ /* Next 4 bytes are not yet defined. */
+
status = unix_perms_from_wire(conn, psbuf, raw_unixmode, PERM_NEW_DIR, &unixmode);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -5259,7 +5261,7 @@ static NTSTATUS smb_posix_mkdir(connection_struct *conn,
close_file(fsp, NORMAL_CLOSE);
}
- info_level_return = SVAL(pdata,12);
+ info_level_return = SVAL(pdata,16);
if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) {
*pdata_return_size = 8 + SMB_FILE_UNIX_BASIC_SIZE;
@@ -5321,7 +5323,7 @@ static NTSTATUS smb_posix_open(connection_struct *conn,
int info = 0;
uint16 info_level_return = 0;
- if (total_data < 14) {
+ if (total_data < 18) {
return NT_STATUS_INVALID_PARAMETER;
}
@@ -5373,6 +5375,8 @@ static NTSTATUS smb_posix_open(connection_struct *conn,
}
raw_unixmode = IVAL(pdata,8);
+ /* Next 4 bytes are not yet defined. */
+
status = unix_perms_from_wire(conn,
psbuf,
raw_unixmode,
@@ -5424,7 +5428,7 @@ static NTSTATUS smb_posix_open(connection_struct *conn,
extended_oplock_granted = True;
}
- info_level_return = SVAL(pdata,12);
+ info_level_return = SVAL(pdata,16);
if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) {
*pdata_return_size = 8 + SMB_FILE_UNIX_BASIC_SIZE;