--- /usr/local/src/otp_src_R8B-1/lib/inets/src/mod_auth.erl Tue Oct 30 11:54:33 2001 +++ mod_auth.erl Thu Jun 20 16:37:04 2002 @@ -875,7 +875,6 @@ %% This is not a good solution, and it will be changed... %% Make sure crypto is started - crypto:start(), {ok,#state{tab = ets:new(auth_pwd,[set,protected])}}. terminate(Reason,State) -> @@ -927,15 +926,10 @@ handle_call({update_auth_pass,Dir,Old,New},_From,State)-> case getPassword(State,Dir) of - OldPwd when binary(OldPwd)-> - case crypto:md5(Old) of - OldPwd -> + Old when binary(Old)-> %%The old password is right update the authPwd to the new update_password(Dir,New,State), {reply,ok,State}; - _-> - {reply,{error,error_new},State} - end; _-> {reply,{error,error_old},State} end; @@ -1001,15 +995,10 @@ controlPassword(Password,State,Dir)-> case getPassword(State,Dir) of - Pwd when binary(Pwd)-> - case crypto:md5(Password) of - Pwd -> + Password -> ok; _-> bad_password - end; - _ -> - bad_password end. @@ -1022,7 +1011,7 @@ end. update_password(Dir,New,State)-> - ets:insert(State#state.tab,{Dir,crypto:md5(New)}). + ets:insert(State#state.tab,{Dir,New}). add_auth_pass(Dir,Pwd0,State)-> case getPassword(State,Dir) of