aboutsummaryrefslogtreecommitdiffstats
path: root/packages/gnupg/gnupg-1.4.0/15_free_caps.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/gnupg/gnupg-1.4.0/15_free_caps.patch
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
downloadopenembedded-c8e5702127e507e82e6f68a4b8c546803accea9d.tar.gz
openembedded-c8e5702127e507e82e6f68a4b8c546803accea9d.tar.bz2
openembedded-c8e5702127e507e82e6f68a4b8c546803accea9d.zip
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/gnupg/gnupg-1.4.0/15_free_caps.patch')
-rw-r--r--packages/gnupg/gnupg-1.4.0/15_free_caps.patch93
1 files changed, 93 insertions, 0 deletions
diff --git a/packages/gnupg/gnupg-1.4.0/15_free_caps.patch b/packages/gnupg/gnupg-1.4.0/15_free_caps.patch
index e69de29bb2..20949a7d49 100644
--- a/packages/gnupg/gnupg-1.4.0/15_free_caps.patch
+++ b/packages/gnupg/gnupg-1.4.0/15_free_caps.patch
@@ -0,0 +1,93 @@
+--- /home/weasel/tmp/debian-gpg/gnupg-1.2.5/g10/status.c 2004-07-21 09:59:45.000000000 +0200
++++ gnupg-1.2.5/g10/status.c 2004-08-01 20:07:42.071690680 +0200
+@@ -346,6 +346,9 @@
+ {
+ char buf[100];
+ struct shmid_ds shmds;
++#ifdef USE_CAPABILITIES
++ cap_t caps;
++#endif
+
+ #ifndef IPC_RMID_DEFERRED_RELEASE
+ atexit( remove_shmid );
+@@ -371,7 +374,9 @@
+ (unsigned)shm_size/1024, shm_area, shm_id );
+ if( lock_mem ) {
+ #ifdef USE_CAPABILITIES
+- cap_set_proc( cap_from_text("cap_ipc_lock+ep") );
++ caps = cap_from_text("cap_ipc_lock=ep");
++ cap_set_proc( caps );
++ cap_free( caps );
+ #endif
+ /* (need the cast for Solaris with Sun's workshop compilers) */
+ if ( mlock ( (char*)shm_area, shm_size) )
+@@ -380,7 +385,9 @@
+ else
+ shm_is_locked = 1;
+ #ifdef USE_CAPABILITIES
+- cap_set_proc( cap_from_text("cap_ipc_lock+p") );
++ caps = cap_from_text("cap_ipc_lock=p");
++ cap_set_proc( caps );
++ cap_free( caps );
+ #endif
+ }
+
+@@ -407,7 +414,9 @@
+
+ if( lock_mem ) {
+ #ifdef USE_CAPABILITIES
+- cap_set_proc( cap_from_text("cap_ipc_lock+ep") );
++ caps = cap_from_text("cap_ipc_lock=ep");
++ cap_set_proc( caps );
++ cap_free( caps );
+ #endif
+ #ifdef IPC_HAVE_SHM_LOCK
+ if ( shmctl (shm_id, SHM_LOCK, 0) )
+@@ -419,7 +428,9 @@
+ log_info("Locking shared memory %d failed: No way to do it\n", shm_id );
+ #endif
+ #ifdef USE_CAPABILITIES
+- cap_set_proc( cap_from_text("cap_ipc_lock+p") );
++ caps = cap_from_text("cap_ipc_lock=p");
++ cap_set_proc( caps );
++ cap_free( caps );
+ #endif
+ }
+
+--- /home/weasel/tmp/debian-gpg/gnupg-1.2.5/util/secmem.c 2004-02-24 17:06:58.000000000 +0100
++++ gnupg-1.2.5/util/secmem.c 2004-08-01 20:08:10.873412378 +0200
+@@ -97,12 +97,18 @@
+ {
+ #if defined(USE_CAPABILITIES) && defined(HAVE_MLOCK)
+ int err;
++ cap_t caps;
++
++ caps = cap_from_text("cap_ipc_lock=ep");
++ cap_set_proc( caps );
++ cap_free( caps );
+
+- cap_set_proc( cap_from_text("cap_ipc_lock+ep") );
+ err = mlock( p, n );
+ if( err && errno )
+ err = errno;
+- cap_set_proc( cap_from_text("cap_ipc_lock+p") );
++ caps = cap_from_text("cap_ipc_lock=p");
++ cap_set_proc( caps );
++ cap_free( caps );
+
+ if( err ) {
+ if( errno != EPERM
+@@ -301,8 +307,12 @@
+ if( !n ) {
+ #ifndef __riscos__
+ #ifdef USE_CAPABILITIES
++ cap_t caps;
++
+ /* drop all capabilities */
+- cap_set_proc( cap_from_text("all-eip") );
++ caps = cap_from_text("all-eip");
++ cap_set_proc( caps );
++ cap_free( caps );
+
+ #elif !defined(HAVE_DOSISH_SYSTEM)
+ uid_t uid;