From 3ff2372fcee1781571937319a43f9671e9bc32354f0960a80eeea41f6fc710d3 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Fri, 2 Oct 2009 22:43:04 +0000 Subject: [PATCH] Updating link to change in openSUSE:Factory/cryptsetup revision 36.0 OBS-URL: https://build.opensuse.org/package/show/security/cryptsetup?expand=0&rev=21f4c973e6781115e6cd1fb195e05bae --- cryptsetup-1.0.7-eofpw.diff | 33 +++++++++++++++++++++++++++++++-- cryptsetup.changes | 5 +++++ cryptsetup.spec | 2 +- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/cryptsetup-1.0.7-eofpw.diff b/cryptsetup-1.0.7-eofpw.diff index 6914ea7..36ce24e 100644 --- a/cryptsetup-1.0.7-eofpw.diff +++ b/cryptsetup-1.0.7-eofpw.diff @@ -1,13 +1,42 @@ +From 6b92a27195e21e9d96ce2f324c3da593a01a7ae0 Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Tue, 29 Sep 2009 11:09:31 +0200 +Subject: [PATCH] Fail if piped input is broken. + +--- + ChangeLog | 1 + + lib/utils.c | 13 ++++++++++--- + 2 files changed, 11 insertions(+), 3 deletions(-) + Index: cryptsetup-1.0.7/lib/utils.c =================================================================== --- cryptsetup-1.0.7.orig/lib/utils.c +++ cryptsetup-1.0.7/lib/utils.c -@@ -452,6 +452,8 @@ int get_key(char *prompt, char **key, un +@@ -361,6 +361,7 @@ int get_key(char *prompt, char **key, un + char *pass = NULL; + int newline_stop; + int read_horizon; ++ int regular_file = 0; + + if(key_file && !strcmp(key_file, "-")) { + /* Allow binary reading from stdin */ +@@ -435,6 +436,8 @@ int get_key(char *prompt, char **key, un + // goto out_err; + fprintf(stderr,"Warning: exhausting read requested, but key file is not a regular file, function might never return.\n"); + } ++ else ++ regular_file = 1; + } + buflen = 0; + for(i = 0; read_horizon == 0 || i < read_horizon; i++) { +@@ -452,6 +455,10 @@ int get_key(char *prompt, char **key, un } if(key_file) close(fd); -+ if(!i) // we didn't read anything, user pressed ^D? ++ /* Fail if piped input dies reading nothing */ ++ if(!i && !regular_file) { + goto out_err; ++ } pass[i] = 0; *key = pass; *passLen = i; diff --git a/cryptsetup.changes b/cryptsetup.changes index db7fa67..2a8a275 100644 --- a/cryptsetup.changes +++ b/cryptsetup.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 29 11:25:58 UTC 2009 - lnussel@suse.de + +- replace patch that quits on EOF with upstream version + ------------------------------------------------------------------- Fri Sep 25 12:42:23 UTC 2009 - lnussel@suse.de diff --git a/cryptsetup.spec b/cryptsetup.spec index 5698956..11022d1 100644 --- a/cryptsetup.spec +++ b/cryptsetup.spec @@ -30,7 +30,7 @@ License: BSD 3-clause (or similar) ; GPL v2 only ; GPL v2 or later Group: System/Base AutoReqProv: on Version: 1.0.7 -Release: 6 +Release: 7 Summary: Set Up dm-crypt Based Encrypted Block Devices Source: cryptsetup-%{version}.tar.bz2 Source1: hashalot-%haver.tar.bz2