Hello community,
here is the log from the commit of package util-linux-crypto
checked in at Wed May 30 01:18:01 CEST 2007.
--------
--- util-linux-crypto/util-linux-crypto.changes 2007-05-09 14:52:45.000000000 +0200
+++ /mounts/work_src_done/STABLE/util-linux-crypto/util-linux-crypto.changes 2007-05-29 16:18:25.000000000 +0200
@@ -1,0 +2,8 @@
+Tue May 29 15:58:44 CEST 2007 - lnussel@suse.de
+
+- fix segfault when trying to open a non existing device
+- fix gcc warnings
+- add Short-Description to boot.crypto
+- use %find_lang
+
+-------------------------------------------------------------------
New:
----
cryptsetup-luks-implicit-declarations.diff
cryptsetup-luks-uninitialized.diff
cryptsetup-luks-warnings.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ util-linux-crypto.spec ++++++
--- /var/tmp/diff_new_pack.p26554/_old 2007-05-30 01:17:38.000000000 +0200
+++ /var/tmp/diff_new_pack.p26554/_new 2007-05-30 01:17:38.000000000 +0200
@@ -22,7 +22,7 @@
Group: System/Base
Autoreqprov: on
Version: 2.12r
-Release: 33
+Release: 39
Summary: A Collection of Basic File System Encryption Utilities
Source: cryptsetup-luks-%csver.tar.bz2
Source1: hashalot-%haver.tar.bz2
@@ -35,7 +35,10 @@
# use this to create the tarball from svn
Source99: cryptsetup-mktar
Patch0: dmconvert-0.2-uninitialized.patch
-Patch1: cryptsetup-luks-libnostderr.diff
+Patch1: cryptsetup-luks-uninitialized.diff
+Patch2: cryptsetup-luks-implicit-declarations.diff
+Patch3: cryptsetup-luks-warnings.diff
+Patch4: cryptsetup-luks-libnostderr.diff
Patch10: hashalot-fixes.diff
Patch11: hashalot-libgcrypt.diff
Patch12: hashalot-ctrl-d.diff
@@ -79,6 +82,9 @@
%patch0
cd cryptsetup-luks-%csver
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
cd ..
%patch10
%patch11
@@ -142,6 +148,8 @@
# man page
install -d -m755 %{buildroot}%{_mandir}/man5
install -m644 %{SOURCE92} %{buildroot}%{_mandir}/man5
+#
+%find_lang %name --all-name
%post
/sbin/ldconfig
@@ -153,7 +161,7 @@
%clean
rm -rf $RPM_BUILD_ROOT
-%files
+%files -f %name.lang
%defattr(-,root,root)
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/crypttab
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/cryptotab
@@ -175,6 +183,11 @@
%{_libdir}/libcryptsetup.so
%changelog
+* Tue May 29 2007 - lnussel@suse.de
+- fix segfault when trying to open a non existing device
+- fix gcc warnings
+- add Short-Description to boot.crypto
+- use %%find_lang
* Wed May 09 2007 - lnussel@suse.de
- boot.crypto: implement 'status'
- boot.crypto: accept argument to start/stop single devices
++++++ boot.crypto ++++++
--- util-linux-crypto/boot.crypto 2007-05-09 14:51:18.000000000 +0200
+++ /mounts/work_src_done/STABLE/util-linux-crypto/boot.crypto 2007-05-29 16:06:42.000000000 +0200
@@ -29,6 +29,7 @@
# Default-Start: B
# Default-Stop:
# Description: Enable crypto file systems before leaving boot phase
+# Short-Description: Enable crypto file systems before leaving boot phase
### END INIT INFO
# Determine the base and follow a runlevel link name.
++++++ cryptsetup-luks-implicit-declarations.diff ++++++
fix implicit function declarations
Signed-off-by: Ludwig Nussel
Index: cryptsetup-luks-1.0.4_SVN30/lib/internal.h
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/internal.h
+++ cryptsetup-luks-1.0.4_SVN30/lib/internal.h
@@ -62,6 +62,9 @@ int hash(const char *backend_name, const
struct setup_backend *get_setup_backend(const char *name);
void put_setup_backend(struct setup_backend *backend);
+void hexprint(char *d, int n);
+
+int sector_size_for_device(const char *device);
ssize_t write_blockwise(int fd, const void *buf, size_t count);
ssize_t read_blockwise(int fd, void *_buf, size_t count);
ssize_t write_lseek_blockwise(int fd, const char *buf, size_t count, off_t offset);
Index: cryptsetup-luks-1.0.4_SVN30/lib/libcryptsetup.h
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/libcryptsetup.h
+++ cryptsetup-luks-1.0.4_SVN30/lib/libcryptsetup.h
@@ -45,6 +45,8 @@ int crypt_luksDelKey(struct crypt_option
int crypt_luksAddKey(struct crypt_options *options);
int crypt_luksUUID(struct crypt_options *options);
int crypt_isLuks(struct crypt_options *options);
+int crypt_luksFormat(struct crypt_options *options);
+int crypt_luksDump(struct crypt_options *options);
void crypt_get_error(char *buf, size_t size);
void crypt_put_options(struct crypt_options *options);
Index: cryptsetup-luks-1.0.4_SVN30/lib/setup.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/setup.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/setup.c
@@ -107,7 +107,7 @@ static int interactive_pass(const char *
{
struct termios orig, tmp;
int failed = -1;
- int infd, outfd;
+ int infd = STDIN_FILENO, outfd;
if (maxlen < 1)
goto out_err;
Index: cryptsetup-luks-1.0.4_SVN30/lib/utils.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/utils.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/utils.c
@@ -9,6 +9,7 @@
#include
#include
#include
+#include
#include
#include "libcryptsetup.h"
Index: cryptsetup-luks-1.0.4_SVN30/luks/af.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/luks/af.c
+++ cryptsetup-luks-1.0.4_SVN30/luks/af.c
@@ -30,6 +30,7 @@
#include
#include "sha1.h"
#include "XORblock.h"
+#include "random.h"
/* diffuse: Information spreading over the whole dataset with
* the help of sha512.
Index: cryptsetup-luks-1.0.4_SVN30/luks/keyencryption.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/luks/keyencryption.c
+++ cryptsetup-luks-1.0.4_SVN30/luks/keyencryption.c
@@ -40,6 +40,9 @@
(__a - 1) / __b + 1; \
})
+static inline int round_up_modulo(int x, int m) {
+ return div_round_up(x, m) * m;
+}
static int setup_mapping(const char *cipher, const char *name,
const char *device, unsigned int payloadOffset,
Index: cryptsetup-luks-1.0.4_SVN30/luks/keymanage.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/luks/keymanage.c
+++ cryptsetup-luks-1.0.4_SVN30/luks/keymanage.c
@@ -141,7 +141,7 @@ int LUKS_write_phdr(const char *device,
return r;
}
-inline int round_up_modulo(int x, int m) {
+static inline int round_up_modulo(int x, int m) {
return div_round_up(x, m) * m;
}
Index: cryptsetup-luks-1.0.4_SVN30/src/cryptsetup.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/src/cryptsetup.c
+++ cryptsetup-luks-1.0.4_SVN30/src/cryptsetup.c
@@ -4,6 +4,7 @@
#include
#include
#include
+#include
#include
#include
@@ -13,6 +14,9 @@
#include "cryptsetup.h"
+// XXX!
+int LUKS_is_last_keyslot(const char *device, unsigned int keyIndex);
+
static int opt_verbose = 1;
static char *opt_cipher = NULL;
static char *opt_hash = DEFAULT_HASH;
++++++ cryptsetup-luks-libnostderr.diff ++++++
--- /var/tmp/diff_new_pack.p26554/_old 2007-05-30 01:17:38.000000000 +0200
+++ /var/tmp/diff_new_pack.p26554/_new 2007-05-30 01:17:38.000000000 +0200
@@ -2,11 +2,11 @@
Signed-off-by: Ludwig Nussel
-Index: cryptsetup-luks-1.0.4_SVN29/lib/setup.c
+Index: cryptsetup-luks-1.0.4_SVN30/lib/setup.c
===================================================================
---- cryptsetup-luks-1.0.4_SVN29.orig/lib/setup.c
-+++ cryptsetup-luks-1.0.4_SVN29/lib/setup.c
-@@ -98,7 +98,7 @@ static int timed_read(int fd, char *pass
+--- cryptsetup-luks-1.0.4_SVN30.orig/lib/setup.c
++++ cryptsetup-luks-1.0.4_SVN30/lib/setup.c
+@@ -96,7 +96,7 @@ static int timed_read(int fd, char *pass
if (select(fd+1, &fds, NULL, NULL, &t) > 0)
failed = untimed_read(fd, pass, maxlen);
else
@@ -15,7 +15,7 @@
return failed;
}
-@@ -197,14 +197,16 @@ static int get_key(struct crypt_options
+@@ -195,14 +195,16 @@ static int get_key(struct crypt_options
pass = safe_alloc(512);
if (!pass || (i = interactive_pass(prompt, pass, 512, options->timeout))) {
@@ -34,7 +34,7 @@
goto out_err;
}
memset(pass_verify, 0, sizeof(pass_verify));
-@@ -385,7 +387,7 @@ static int parse_into_name_and_mode(cons
+@@ -383,7 +385,7 @@ static int parse_into_name_and_mode(cons
strncpy(mode,"cbc-plain",10);
}
else {
@@ -43,7 +43,7 @@
return -EINVAL;
}
}
-@@ -643,7 +645,6 @@ start:
+@@ -642,7 +644,6 @@ start:
r = -EINVAL; goto out;
}
if((r = LUKS_open_any_key(options->device, password, passwordLen, &hdr, &mk, backend)) < 0) {
@@ -51,7 +51,7 @@
goto out1;
}
-@@ -718,7 +719,7 @@ static int __crypt_luks_add_key(int arg,
+@@ -716,7 +717,7 @@ static int __crypt_luks_add_key(int arg,
r = -EINVAL; goto out;
}
if(LUKS_open_any_key(device, password, passwordLen, &hdr, &mk, backend) < 0) {
@@ -60,7 +60,7 @@
r = -EPERM; goto out;
}
safe_free(password);
-@@ -761,7 +762,7 @@ static int __crypt_luks_del_key(int arg,
+@@ -759,7 +760,7 @@ static int __crypt_luks_del_key(int arg,
}
openedIndex = LUKS_open_any_key(device, password, passwordLen, &hdr, &mk, backend);
if(openedIndex < 0 || keyIndex == openedIndex) {
@@ -69,10 +69,10 @@
r = -EPERM; goto out;
}
}
-Index: cryptsetup-luks-1.0.4_SVN29/luks/keymanage.c
+Index: cryptsetup-luks-1.0.4_SVN30/luks/keymanage.c
===================================================================
---- cryptsetup-luks-1.0.4_SVN29.orig/luks/keymanage.c
-+++ cryptsetup-luks-1.0.4_SVN29/luks/keymanage.c
+--- cryptsetup-luks-1.0.4_SVN30.orig/luks/keymanage.c
++++ cryptsetup-luks-1.0.4_SVN30/luks/keymanage.c
@@ -76,20 +76,20 @@ int LUKS_read_phdr(const char *device, s
devfd = open(device,O_RDONLY | O_DIRECT | O_SYNC);
@@ -151,11 +151,11 @@
return -EINVAL;
}
-Index: cryptsetup-luks-1.0.4_SVN29/lib/utils.c
+Index: cryptsetup-luks-1.0.4_SVN30/lib/utils.c
===================================================================
---- cryptsetup-luks-1.0.4_SVN29.orig/lib/utils.c
-+++ cryptsetup-luks-1.0.4_SVN29/lib/utils.c
-@@ -225,7 +225,7 @@ ssize_t read_blockwise(int fd, void *ori
+--- cryptsetup-luks-1.0.4_SVN30.orig/lib/utils.c
++++ cryptsetup-luks-1.0.4_SVN30/lib/utils.c
+@@ -226,7 +226,7 @@ ssize_t read_blockwise(int fd, void *ori
while(count) {
r = read(fd,padbuf,bsize);
if(r < 0 || r != bsize) {
@@ -164,11 +164,11 @@
goto out;
}
step = countsize = round_up_modulo(srcLength,device_sector_size)/SECTOR_SIZE;
-@@ -118,7 +118,8 @@ static int LUKS_endec_template(char *src
+@@ -121,7 +121,8 @@ static int LUKS_endec_template(char *src
r = setup_mapping(dmCipherSpec,name,device,hdr->payloadOffset,key,keyLength,sector,srcLength,backend,mode);
if(r < 0) {
++++++ cryptsetup-luks-uninitialized.diff ++++++
fix segfault when trying to open a non existing device
Signed-off-by: Ludwig Nussel
Index: cryptsetup-luks-1.0.4_SVN30/lib/setup.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/setup.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/setup.c
@@ -608,7 +608,7 @@ out:
static int __crypt_luks_open(int arg, struct setup_backend *backend, struct crypt_options *options)
{
- struct luks_masterkey *mk;
+ struct luks_masterkey *mk=NULL;
struct luks_phdr hdr;
char *password; int passwordLen;
struct device_infos infos;
++++++ cryptsetup-luks-warnings.diff ++++++
fix some gcc warnings
Signed-off-by: Ludwig Nussel
Index: cryptsetup-luks-1.0.4_SVN30/lib/libdevmapper.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/libdevmapper.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/libdevmapper.c
@@ -258,7 +258,7 @@ static int dm_query_device(int details,
options->skip = 0;
options->size = length;
if (details) {
- char *cipher, *key_, *device, *tmp;
+ char *cipher, *key_, *device;
uint64_t val64;
set_error("Invalid dm table");
Index: cryptsetup-luks-1.0.4_SVN30/lib/setup.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/setup.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/setup.c
@@ -57,8 +57,6 @@ static int setup_enter(struct setup_back
static int setup_leave(struct setup_backend *backend)
{
- const char *error;
-
if (backend)
backend->exit();
Index: cryptsetup-luks-1.0.4_SVN30/lib/utils.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/utils.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/utils.c
@@ -173,7 +173,7 @@ ssize_t write_blockwise(int fd, const vo
{
char *padbuf; char *padbuf_base;
char *buf = (char *)orig_buf;
- int r;
+ int r = 0;
int hangover; int solid; int bsize;
if ((bsize = sector_size(fd)) < 0)
@@ -213,7 +213,7 @@ ssize_t write_blockwise(int fd, const vo
ssize_t read_blockwise(int fd, void *orig_buf, size_t count) {
char *padbuf; char *padbuf_base;
char *buf = (char *)orig_buf;
- int r;
+ int r = 0;
int step;
int bsize;
Index: cryptsetup-luks-1.0.4_SVN30/luks/keymanage.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/luks/keymanage.c
+++ cryptsetup-luks-1.0.4_SVN30/luks/keymanage.c
@@ -417,7 +417,7 @@ static int wipe(const char *device, unsi
int LUKS_del_key(const char *device, unsigned int keyIndex)
{
struct luks_phdr hdr;
- unsigned int i, startOffset, endOffset, stripesLen;
+ unsigned int startOffset, endOffset, stripesLen;
int r;
r = LUKS_read_phdr(device, &hdr);
Index: cryptsetup-luks-1.0.4_SVN30/luks/random.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/luks/random.c
+++ cryptsetup-luks-1.0.4_SVN30/luks/random.c
@@ -13,7 +13,7 @@
int getRandom(char *buf, size_t len)
{
- int randomfd, r = 0, index = 0;
+ int randomfd, r = 0;
//FIXME Run a FIPS test for the random device or include
// PRNG if urandom not avail.
Index: cryptsetup-luks-1.0.4_SVN30/src/cryptsetup.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/src/cryptsetup.c
+++ cryptsetup-luks-1.0.4_SVN30/src/cryptsetup.c
@@ -203,7 +203,8 @@ static int yesDialog(char *msg)
size_t size=0;
fprintf(stderr,"\nWARNING!\n========\n");
fprintf(stderr,"%s\n\nAre you sure? (Type uppercase yes): ",msg);
- getline(&answer,&size,stdin);
+ if(getline(&answer,&size,stdin) == -1)
+ return 0;
if(strcmp(answer,"YES\n") == 0)
r = 1;
free(answer);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org