diff options
author | Steve French <sfrench@us.ibm.com> | 2005-09-18 23:49:21 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-09-18 23:49:21 -0400 |
commit | 3e87d80391c84eefceb4bda94a6363661dba4f71 (patch) | |
tree | ef39515dde8b86007de4ad769716d375b8973dca /fs/cifs/cifssmb.c | |
parent | f9f5c81769f88bccd177423a30a7d30461754c39 (diff) |
[CIFS] Add support for legacy servers part seven. Fix open for write,
begin implementation of Win9x style set file size via open then
write of zero bytes.
Signed-off-by: Steve French (sfrench@us.ibm.com)
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index b8830118f09a..575b2281518d 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -766,7 +766,7 @@ OldOpenRetry: | |||
766 | if(create_options & CREATE_OPTION_SPECIAL) | 766 | if(create_options & CREATE_OPTION_SPECIAL) |
767 | pSMB->FileAttributes = cpu_to_le16(ATTR_SYSTEM); | 767 | pSMB->FileAttributes = cpu_to_le16(ATTR_SYSTEM); |
768 | else | 768 | else |
769 | pSMB->FileAttributes = cpu_to_le16(ATTR_NORMAL); | 769 | pSMB->FileAttributes = cpu_to_le16(0/*ATTR_NORMAL*/); /* BB FIXME */ |
770 | 770 | ||
771 | /* if ((omode & S_IWUGO) == 0) | 771 | /* if ((omode & S_IWUGO) == 0) |
772 | pSMB->FileAttributes |= cpu_to_le32(ATTR_READONLY);*/ | 772 | pSMB->FileAttributes |= cpu_to_le32(ATTR_READONLY);*/ |
@@ -777,6 +777,8 @@ OldOpenRetry: | |||
777 | /* BB FIXME BB */ | 777 | /* BB FIXME BB */ |
778 | /* pSMB->CreateOptions = cpu_to_le32(create_options & CREATE_OPTIONS_MASK); */ | 778 | /* pSMB->CreateOptions = cpu_to_le32(create_options & CREATE_OPTIONS_MASK); */ |
779 | /* BB FIXME END BB */ | 779 | /* BB FIXME END BB */ |
780 | |||
781 | pSMB->Sattr = cpu_to_le16(ATTR_HIDDEN | ATTR_SYSTEM | ATTR_DIRECTORY); | ||
780 | pSMB->OpenFunction = convert_disposition(openDisposition); | 782 | pSMB->OpenFunction = convert_disposition(openDisposition); |
781 | count += name_len; | 783 | count += name_len; |
782 | pSMB->hdr.smb_buf_length += count; | 784 | pSMB->hdr.smb_buf_length += count; |
@@ -3689,7 +3691,7 @@ SetEOFRetry: | |||
3689 | PATH_MAX, nls_codepage, remap); | 3691 | PATH_MAX, nls_codepage, remap); |
3690 | name_len++; /* trailing null */ | 3692 | name_len++; /* trailing null */ |
3691 | name_len *= 2; | 3693 | name_len *= 2; |
3692 | } else { /* BB improve the check for buffer overruns BB */ | 3694 | } else { /* BB improve the check for buffer overruns BB */ |
3693 | name_len = strnlen(fileName, PATH_MAX); | 3695 | name_len = strnlen(fileName, PATH_MAX); |
3694 | name_len++; /* trailing null */ | 3696 | name_len++; /* trailing null */ |
3695 | strncpy(pSMB->FileName, fileName, name_len); | 3697 | strncpy(pSMB->FileName, fileName, name_len); |
@@ -3697,7 +3699,7 @@ SetEOFRetry: | |||
3697 | params = 6 + name_len; | 3699 | params = 6 + name_len; |
3698 | data_count = sizeof (struct file_end_of_file_info); | 3700 | data_count = sizeof (struct file_end_of_file_info); |
3699 | pSMB->MaxParameterCount = cpu_to_le16(2); | 3701 | pSMB->MaxParameterCount = cpu_to_le16(2); |
3700 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB size from sess */ | 3702 | pSMB->MaxDataCount = cpu_to_le16(4100); |
3701 | pSMB->MaxSetupCount = 0; | 3703 | pSMB->MaxSetupCount = 0; |
3702 | pSMB->Reserved = 0; | 3704 | pSMB->Reserved = 0; |
3703 | pSMB->Flags = 0; | 3705 | pSMB->Flags = 0; |
@@ -4079,7 +4081,7 @@ setPermsRetry: | |||
4079 | PATH_MAX, nls_codepage, remap); | 4081 | PATH_MAX, nls_codepage, remap); |
4080 | name_len++; /* trailing null */ | 4082 | name_len++; /* trailing null */ |
4081 | name_len *= 2; | 4083 | name_len *= 2; |
4082 | } else { /* BB improve the check for buffer overruns BB */ | 4084 | } else { /* BB improve the check for buffer overruns BB */ |
4083 | name_len = strnlen(fileName, PATH_MAX); | 4085 | name_len = strnlen(fileName, PATH_MAX); |
4084 | name_len++; /* trailing null */ | 4086 | name_len++; /* trailing null */ |
4085 | strncpy(pSMB->FileName, fileName, name_len); | 4087 | strncpy(pSMB->FileName, fileName, name_len); |