lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Jun 2007 13:51:24 +0200
From:	Karsten Hopp <karsten@...hat.com>
To:	Theodore Tso <tytso@....edu>
CC:	linux-ext4@...r.kernel.org
Subject: Re: Patch to support LUKS UUIDs in libblkid

Theodore Tso schrieb:
> In addition to the comments already posted:
> 
>> +/* check it manually as using LUKS_read_phdr from libcryptsetup
>> + * prints too many warnings if it isn't a luks partition and would add a
>> + * dependency on the lib */
>> +static int probe_luks(struct blkid_probe *probe,
>> +		       struct blkid_magic *id __BLKID_ATTR((unused)), 
>> +		       unsigned char *buf)
>> +{
>> +	const char *luks_magic = id->bim_magic;
>> +	unsigned char *p_buf = buf;
>> +	unsigned char uuid[40];
>> +	if(strncmp(buf, luks_magic, strlen(luks_magic)) == 0)   /* ID matches, continue */
> 
> There's no point in doing this check, since it's replicating a check
> already done in the generic code.  The probe function won't be called
> if the bim_magic didn't match the specified offset. 
> 
> 						- Ted

Thanks everyone for the replys.
I'll attach a new patch with the suggested fixes.

    Karsten

--
  Karsten Hopp        | Mail: karsten@...hat.de
  Red Hat Deutschland | Tel: +49-711-96437-0
  Hauptstaetterstr.58 | Fax: +49-711-613590
  D-70178 Stuttgart   | http://www.redhat.de

View attachment "e2fsprogs-1.39-luks.patch" of type "text/x-patch" (1617 bytes)

Powered by blists - more mailing lists