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  linux-cve-announce  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]
Message-Id: <A044F830-D13A-40CE-9DC5-1CD3A91314BF@whamcloud.com>
Date:	Fri, 23 Sep 2011 17:44:13 -0600
From:	Andreas Dilger <adilger@...mcloud.com>
To:	Andreas Dilger <adilger@...mcloud.com>
Cc:	tytso@....edu, linux-ext4@...r.kernel.org
Subject: Re: [PATCH 1/4] misc: quiet minor compiler errors

On 2011-09-23, at 5:38 PM, Andreas Dilger wrote:
> Several compiler errors are quieted:
> - use of stat64/open64 on OSX (deprecated API)

I forgot to mention in the commit summary, but worthwhile to mention so
that this patch is accepted upstream promptly, is that this also fixes
a bug in the ext2fs_stat() implementation if stat64() does not exist.

The fallback code was incorrectly using open() instead of stat(), but
since stat64() has existed for ages it would only be seen in unusual
cases (e.g. compiling on OS/X).

> diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
> index 1b9acc3..ab47621 100644
> --- a/lib/ext2fs/ext2fs.h
> +++ b/lib/ext2fs/ext2fs.h
> 
> _INLINE_ int ext2fs_stat(const char *path, ext2fs_struct_stat *buf)
> {
> -#ifdef HAVE_OPEN64
> +#if defined(HAVE_STAT64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
> 	return stat64(path, buf);
> #else
> -	return open(path, buf);
> +	return stat(path, buf);
> +#endif
> +}

Cheers, Andreas
--
Andreas Dilger 
Principal Engineer
Whamcloud, Inc.



--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ