Re: libcap-0.104

Andrew Morgan (morgan@transmeta.com)
Sun, 7 Jun 1998 09:24:20 -0700


Thomas Bogendoerfer writes:
> I've tried to compile libcap-0.100 and libcap-0.104 and I'm wondering wether
> you ever used the linux/capability.h that comes with Linus kernel sources. It

Evidently not. :*[

> looks like you have your own one, which defines things a little bit different
> than the kernel include file. Any plans to fix that ?

Thanks for pointing this out... Since the 0.104 library did not work
out of the box, I have replaced the broken tar.gz file with a fixed
one:

ftp://linux.kernel.org/pub/linux/libs/security/linux-privs/libcap-0.104.tar.gz

Cheers

Andrew

Here is a patch for the old version [so you can see what changed.]
==================================================================
RCS file: libcap/RCS/_makenames.c,v
retrieving revision 1.3
diff -u -r1.3 libcap/_makenames.c
--- libcap/_makenames.c 1998/05/24 22:54:09 1.3
+++ libcap/_makenames.c 1998/06/07 15:50:12
@@ -1,5 +1,5 @@
/*
- * $Id: _makenames.c,v 1.3 1998/05/24 22:54:09 morgan Exp $
+ * $Id: _makenames.c,v 1.4 1998/06/07 15:50:12 morgan Exp $
*
* Copyright (c) 1997-8 Andrew G. Morgan <morgan@linux.kernel.org>
*
@@ -24,7 +24,7 @@
};

/* this should be more than big enough (factor of three at least) */
-const char *pointers[8*sizeof(struct _user_cap_data_struct)];
+const char *pointers[8*sizeof(struct __user_cap_data_struct)];

int main(void)
{
@@ -64,6 +64,9 @@

/*
* $Log: _makenames.c,v $
+ * Revision 1.4 1998/06/07 15:50:12 morgan
+ * updated to accommodate kernel's real header file :*)
+ *
* Revision 1.3 1998/05/24 22:54:09 morgan
* updated for 2.1.104
*
===================================================================
RCS file: libcap/RCS/libcap.h,v
retrieving revision 1.3
diff -u -r1.3 libcap/libcap.h
--- libcap/libcap.h 1998/05/24 22:54:09 1.3
+++ libcap/libcap.h 1998/06/07 15:58:23
@@ -1,5 +1,5 @@
/*
- * $Id: libcap.h,v 1.3 1998/05/24 22:54:09 morgan Exp $
+ * $Id: libcap.h,v 1.4 1998/06/07 15:58:23 morgan Exp $
*
* Copyright (c) 1997 Andrew G Morgan <morgan@linux.kernel.org>
*
@@ -33,8 +33,8 @@
#define CAP_T_MAGIC 0xCA90D0
struct _cap_struct {
int magic;
- struct _user_cap_header_struct head;
- struct _user_cap_data_struct set;
+ struct __user_cap_header_struct head;
+ struct __user_cap_data_struct set;
};

/*
@@ -54,7 +54,7 @@
*/

#define NUMBER_OF_CAP_SETS 3 /* effective, inheritable, permitted */
-#define CAP_SET_SIZE (sizeof(struct _user_cap_data_struct)/NUMBER_OF_CAP_SETS)
+#define CAP_SET_SIZE (sizeof(struct __user_cap_data_struct)/NUMBER_OF_CAP_SETS)
#define __CAP_BLKS (CAP_SET_SIZE/sizeof(__u32))
typedef struct {
__u32 _blk[__CAP_BLKS];
@@ -106,6 +106,9 @@

/*
* $Log: libcap.h,v $
+ * Revision 1.4 1998/06/07 15:58:23 morgan
+ * accommodate real kernel header files :*)
+ *
* Revision 1.3 1998/05/24 22:54:09 morgan
* updated for 2.1.104
*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu