aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2012-02-07 14:27:52 +0100
committerIngela Anderton Andin <[email protected]>2012-02-10 15:34:29 +0100
commit7e3101ebcf816925e3f6b0d4fdd75b18999b63ad (patch)
tree3b815f956baee2968e3ec919099e358b5e804d14 /lib/ssh/src
parentc44ad548ebff4b4aaa6c7eafa463a94f638bf9d6 (diff)
downloadotp-7e3101ebcf816925e3f6b0d4fdd75b18999b63ad.tar.gz
otp-7e3101ebcf816925e3f6b0d4fdd75b18999b63ad.tar.bz2
otp-7e3101ebcf816925e3f6b0d4fdd75b18999b63ad.zip
Correct access flag handling in sftpd
Also Moved app test to ssh_basic_SUITE There is no reason to have a separate suite for the app test it increases maintenance costs
Diffstat (limited to 'lib/ssh/src')
-rw-r--r--lib/ssh/src/ssh_sftpd.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh_sftpd.erl b/lib/ssh/src/ssh_sftpd.erl
index 60b48d622f..8cc414f83a 100644
--- a/lib/ssh/src/ssh_sftpd.erl
+++ b/lib/ssh/src/ssh_sftpd.erl
@@ -599,6 +599,8 @@ decode_4_access_flag(add_subdirectory) ->
[read];
decode_4_access_flag(append_data) ->
[append];
+decode_4_access_flag(write_attributes) ->
+ [write];
decode_4_access_flag(_) ->
[read].
@@ -613,7 +615,7 @@ open(Vsn, ReqId, Data, State) when Vsn =< 3 ->
<<?UINT32(BLen), BPath:BLen/binary, ?UINT32(PFlags),
_Attrs/binary>> = Data,
Path = binary_to_list(BPath),
- Flags = ssh_xfer:decode_open_flags(Vsn, PFlags) -- [creat, excl, trunc],
+ Flags = ssh_xfer:decode_open_flags(Vsn, PFlags),
do_open(ReqId, State, Path, Flags);
open(Vsn, ReqId, Data, State) when Vsn >= 4 ->
<<?UINT32(BLen), BPath:BLen/binary, ?UINT32(Access),
@@ -635,7 +637,7 @@ open(Vsn, ReqId, Data, State) when Vsn >= 4 ->
do_open(ReqId, State0, Path, Flags) ->
#state{file_handler = FileMod, file_state = FS0, root = Root} = State0,
XF = State0#state.xf,
- F = [raw, binary | Flags],
+ F = [binary | Flags],
%% case FileMod:is_dir(Path) of %% This is version 6 we still have 5
%% true ->
%% ssh_xfer:xf_send_status(State#state.xf, ReqId,