Subversion Repositories lsh

Compare Revisions

Ignore whitespace Rev 20 → Rev 21

/trunk/debian/patches/40_better_errmsg_when_dotlsh_missing.dpatch
0,0 → 1,36
#! /bin/sh /usr/share/dpatch/dpatch-run
## 40_mkdir_dotlsh.dpatch by <holmgren@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
 
@DPATCH@
diff -urNad trunk~/src/unix_random.c trunk/src/unix_random.c
--- trunk~/src/unix_random.c 2006-01-23 18:47:10.000000000 +0100
+++ trunk/src/unix_random.c 2008-06-24 22:29:29.000000000 +0200
@@ -353,6 +353,15 @@
yarrow256_init(&self->yarrow, RANDOM_NSOURCES, self->sources);
+ if (access(lsh_get_cstring(seed_file_name), F_OK) < 0)
+ {
+ werror("No seed file. Please create one by running\n");
+ werror("lsh-make-seed -o \"%S\".\n", seed_file_name);
+
+ KILL(self);
+ return NULL;
+ }
+
verbose("Reading seed-file `%S'\n", seed_file_name);
self->lock
@@ -374,8 +383,7 @@
self->seed_file_fd = open(lsh_get_cstring(seed_file_name), O_RDWR);
if (self->seed_file_fd < 0)
{
- werror("No seed file. Please create one by running\n");
- werror("lsh-make-seed -o \"%S\".\n", seed_file_name);
+ werror("Could not open seed file \"%S\".\n", seed_file_name);
KILL_RESOURCE(lock);
KILL(self);
Property changes:
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: patches/00list
===================================================================
--- patches/00list (revision 20)
+++ patches/00list (revision 21)
@@ -1,2 +1,3 @@
20_sftp-server_mansection
30_nonettle
+40_better_errmsg_when_dotlsh_missing
Index: changelog
===================================================================
--- changelog (revision 20)
+++ changelog (revision 21)
@@ -1,3 +1,11 @@
+lsh-utils (2.0.4-dfsg-2) unstable; urgency=low
+
+ * 40_better_errmsg_when_dotlsh_missing.dpatch (new): In unix_random.c,
+ check whether the seed file exists before trying to lock it, and give
+ the hint about running lsh-make-seed if it doesn't (Closes: #485856).
+
+ --
+
lsh-utils (2.0.4-dfsg-1) unstable; urgency=low
* New upstream release (Closes: #422199)