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]
Date:	Tue, 16 Sep 2008 17:43:45 +0300
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	Ulrich Drepper <drepper@...hat.com>
Cc:	Adrian Bunk <bunk@...nel.org>, linux-kernel@...r.kernel.org,
	Davide Libenzi <davidel@...ilserver.org>,
	David Woodhouse <dwmw2@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] linux/inotify.h: do not include <linux/fcntl.h> in
	userspace

On Tue, Sep 16, 2008 at 07:10:25AM -0700, Ulrich Drepper wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Kirill A. Shutemov wrote:
> >> What is the error message?
> > 
> > /usr/include/asm-generic/fcntl.h:117: error: redefinition of 'struct
> > flock'
> 
> And?  None of these programs should use <linux/inotify.h>.  There has
> for the longest time been a <sys/inotify.h> header which doesn't need
> any kernel headers.  In fact, <linux/inotify.h> should not be exported.

Ok. Let's unexport <linux/inotify.h>.

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index b68ec09..dbb8107 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -240,7 +240,6 @@ unifdef-y += igmp.h
 unifdef-y += inet_diag.h
 unifdef-y += in.h
 unifdef-y += in6.h
-unifdef-y += inotify.h
 unifdef-y += input.h
 unifdef-y += ip.h
 unifdef-y += ipc.h
diff --git a/include/linux/inotify.h b/include/linux/inotify.h
index bd57857..0188b6a 100644
--- a/include/linux/inotify.h
+++ b/include/linux/inotify.h
@@ -10,6 +10,8 @@
 /* For O_CLOEXEC and O_NONBLOCK */
 #include <linux/fcntl.h>
 #include <linux/types.h>
+#include <linux/dcache.h>
+#include <linux/fs.h>
 
 /*
  * struct inotify_event - structure read from the inotify device for each event
@@ -69,11 +71,6 @@ struct inotify_event {
 #define IN_CLOEXEC O_CLOEXEC
 #define IN_NONBLOCK O_NONBLOCK
 
-#ifdef __KERNEL__
-
-#include <linux/dcache.h>
-#include <linux/fs.h>
-
 /*
  * struct inotify_watch - represents a watch request on a specific inode
  *
@@ -230,6 +227,4 @@ static inline void put_inotify_watch(struct inotify_watch *watch)
 
 #endif	/* CONFIG_INOTIFY */
 
-#endif	/* __KERNEL __ */
-
 #endif	/* _LINUX_INOTIFY_H */

-- 
Regards,  Kirill A. Shutemov
 + Belarus, Minsk
 + ALT Linux Team, http://www.altlinux.com/

Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ