[Pkg-erlang-commits] r1461 - in yaws/trunk/debian: . patches

sgolovan at alioth.debian.org sgolovan at alioth.debian.org
Tue Jun 26 06:09:36 UTC 2012


Author: sgolovan
Date: 2012-06-26 06:09:35 +0000 (Tue, 26 Jun 2012)
New Revision: 1461

Removed:
   yaws/trunk/debian/patches/listing.diff
   yaws/trunk/debian/patches/random.diff
Modified:
   yaws/trunk/debian/changelog
   yaws/trunk/debian/patches/series
   yaws/trunk/debian/rules
Log:
[yaws]
  * New upstream bugfix release.
  * Removed patches introduced in 1.93-1 and 1.93-2.


Modified: yaws/trunk/debian/changelog
===================================================================
--- yaws/trunk/debian/changelog	2012-06-26 05:31:03 UTC (rev 1460)
+++ yaws/trunk/debian/changelog	2012-06-26 06:09:35 UTC (rev 1461)
@@ -1,8 +1,9 @@
-yaws (1.93-3) UNRELEASED; urgency=low
+yaws (1.94-1) unstable; urgency=low
 
-  * NOT RELEASED YET
+  * New upstream bugfix release.
+  * Removed patches introduced in 1.93-1 and 1.93-2.
 
- -- Sergei Golovan <sgolovan at debian.org>  Tue, 26 Jun 2012 09:31:01 +0400
+ -- Sergei Golovan <sgolovan at debian.org>  Tue, 26 Jun 2012 10:08:55 +0400
 
 yaws (1.93-2) unstable; urgency=low
 

Deleted: yaws/trunk/debian/patches/listing.diff
===================================================================
--- yaws/trunk/debian/patches/listing.diff	2012-06-26 05:31:03 UTC (rev 1460)
+++ yaws/trunk/debian/patches/listing.diff	2012-06-26 06:09:35 UTC (rev 1461)
@@ -1,15 +0,0 @@
-Description: Patch fixes delivering the directory listings.
-Author: Sergei Golovan
-Last-updated: Tue, 26 Jun 2012 09:14:49 +0400
-
---- yaws-1.93.orig/src/yaws_ls.erl
-+++ yaws-1.93/src/yaws_ls.erl
-@@ -69,7 +69,7 @@
-     B = list_to_binary(Body),
- 
-     yaws_server:accumulate_content(B),
--    yaws_server:deliver_accumulated(Arg, CliSock, decide, undefined, final),
-+    yaws_server:deliver_accumulated(Arg, CliSock, undefined, final),
-     yaws_server:done_or_continue().
- 
- parse_query(Path) ->

Deleted: yaws/trunk/debian/patches/random.diff
===================================================================
--- yaws/trunk/debian/patches/random.diff	2012-06-26 05:31:03 UTC (rev 1460)
+++ yaws/trunk/debian/patches/random.diff	2012-06-26 06:09:35 UTC (rev 1461)
@@ -1,112 +0,0 @@
-Author: Sergei Golovan
-Description: Patch replaces random:uniform/1 calls by crypto:rand_bytes/1
- which is more secure. Also, it ensures the cookie in yaws_session_server
- is printable.
-Last-modified: Sun, 24 Jun 2012 15:10:40 +0400
-
---- yaws-1.93.orig/applications/mail/src/smtp.erl
-+++ yaws-1.93/applications/mail/src/smtp.erl
-@@ -88,7 +88,10 @@
-     lists:flatten(
-       io_lib:format("~s_~2.2.0w_~s_~w_~2.2.0w:~2.2.0w:~2.2.0w_~w",
-                     [weekday(Y,Mo,D), D, int_to_mt(Mo),
--                     Y,H,M,S,random:uniform(5000)])).
-+                     Y,H,M,S,bin2int(crypto:rand_bytes(4))])).
-+
-+bin2int(Bin) ->
-+    lists:foldl(fun(N, Acc) -> Acc * 256 + N end, 0, binary_to_list(Bin)).
- 
- 
- smtp_init(Server, From, Recipients) ->
---- yaws-1.93.orig/applications/mail/src/mail.erl
-+++ yaws-1.93/applications/mail/src/mail.erl
-@@ -1053,8 +1053,6 @@
-     end.
- 
- session_manager_init() ->
--    {X,Y,Z} = seed(),
--    random:seed(X, Y, Z),
-     session_manager([], now(), read_config()).
- 
- session_manager(C0, LastGC0, Cfg) ->
-@@ -1078,7 +1076,7 @@
-             end,
-             session_manager(C, LastGC, Cfg);
-         {new_session, Session, From} ->
--            Cookie = integer_to_list(random:uniform(1 bsl 50)),
-+            Cookie = integer_to_list(bin2int(crypto:rand_bytes(16))),
-             From ! {session_manager, Cookie},
-             session_manager([{Cookie, Session#session{cookie=Cookie},
-                               now()}|C], LastGC, Cfg);
-@@ -1219,15 +1217,6 @@
- diff({M1,S1,_}, {M2,S2,_}) ->
-     (M2-M1)*1000000+(S2-S1).
- 
--seed() ->
--    case (catch list_to_binary(
--                  os:cmd("dd if=/dev/urandom ibs=12 count=1 2>/dev/null"))) of
--        <<X:32, Y:32, Z:32>> ->
--            {X, Y, Z};
--        _ ->
--            now()
--    end.
--
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 
- retr(Server, User, Password, Nr) ->
-@@ -1959,7 +1948,10 @@
-     lists:flatten(
-       io_lib:format("~s_~2.2.0w_~s_~w_~2.2.0w:~2.2.0w:~2.2.0w_~w",
-                     [weekday(Y1,Y2,Mo,D), D, int_to_mt(Mo),
--                     y(Y1,Y2),H,M,S,random:uniform(5000)])).
-+                     y(Y1,Y2),H,M,S,bin2int(crypto:rand_bytes(4))])).
-+
-+bin2int(Bin) ->
-+    lists:foldl(fun(N, Acc) -> Acc * 256 + N end, 0, binary_to_list(Bin)).
- 
- date_and_time_to_string(DAT) ->
-     case validate_date_and_time(DAT) of
---- yaws-1.93.orig/applications/chat/src/chat.erl
-+++ yaws-1.93/applications/chat/src/chat.erl
-@@ -148,7 +148,7 @@
-             end,
-             chat_server(Users);
-         {new_session, User, From} ->
--            Cookie = integer_to_list(random:uniform(1 bsl 50)),
-+            Cookie = integer_to_list(bin2int(crypto:rand_bytes(16))),
-             Session = #user{cookie=Cookie, user=User, color=pick_color()},
-             From ! {session_manager, Cookie, Session},
-             chat_server([Session|Users]);
-@@ -187,6 +187,9 @@
-         5000 ->
-             chat_server(Users)
-     end.
-+
-+bin2int(Bin) ->
-+    lists:foldl(fun(N, Acc) -> Acc * 256 + N end, 0, binary_to_list(Bin)).
- 
- 
- %%
---- yaws-1.93.orig/src/yaws_session_server.erl
-+++ yaws-1.93/src/yaws_session_server.erl
-@@ -151,8 +151,8 @@
-     handle_call({new_session, Opaque, ?TTL, Cleanup, Cookie}, From, State);
- 
- handle_call({new_session, Opaque, TTL, Cleanup, undefined}, From, State) ->
--    N = crypto:rand_bytes(16),
--    Cookie = atom_to_list(node()) ++ [$-|binary_to_list(N)],
-+    N = bin2int(crypto:rand_bytes(16)),
-+    Cookie = atom_to_list(node()) ++ [$-|integer_to_list(N)],
-     handle_call({new_session, Opaque, TTL, Cleanup, Cookie}, From, State);
- 
- handle_call({new_session, Opaque, TTL, Cleanup, Cookie}, _From, State) ->
-@@ -268,6 +268,9 @@
- %%%----------------------------------------------------------------------
- %%% Internal functions
- %%%----------------------------------------------------------------------
-+
-+bin2int(Bin) ->
-+    lists:foldl(fun(N, Acc) -> Acc * 256 + N end, 0, binary_to_list(Bin)).
- 
- %% timeout once every hour even if the server handles traffic all the time.
- start_long_timer() ->

Modified: yaws/trunk/debian/patches/series
===================================================================
--- yaws/trunk/debian/patches/series	2012-06-26 05:31:03 UTC (rev 1460)
+++ yaws/trunk/debian/patches/series	2012-06-26 06:09:35 UTC (rev 1461)
@@ -2,5 +2,3 @@
 gnu.diff
 docs.diff
 m32m64.diff
-random.diff
-listing.diff

Modified: yaws/trunk/debian/rules
===================================================================
--- yaws/trunk/debian/rules	2012-06-26 05:31:03 UTC (rev 1460)
+++ yaws/trunk/debian/rules	2012-06-26 06:09:35 UTC (rev 1461)
@@ -217,7 +217,7 @@
 
 binary: binary-arch binary-indep
 
-VSN=1.93
+VSN=1.94
 
 get-orig-source:
 	wget -O - http://yaws.hyber.org/download/yaws-$(VSN).tar.gz | tar zx




More information about the Pkg-erlang-commits mailing list