From owner-freebsd-questions Thu Sep 17 14:45:16 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA13310 for freebsd-questions-outgoing; Thu, 17 Sep 1998 14:45:16 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from B1FF.nas.nasa.gov (b1ff.nas.nasa.gov [129.99.34.135]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA13153 for ; Thu, 17 Sep 1998 14:44:37 -0700 (PDT) (envelope-from rone@B1FF.nas.nasa.gov) Received: (from rone@localhost) by B1FF.nas.nasa.gov (8.8.8/8.8.8) id OAA07015 for questions@freebsd.org; Thu, 17 Sep 1998 14:44:10 -0700 (PDT) (envelope-from rone) From: Ron Echeverri Message-Id: <199809172144.OAA07015@B1FF.nas.nasa.gov> Subject: need help compiling GPG 0.3.5 To: questions@FreeBSD.ORG Date: Thu, 17 Sep 1998 14:44:10 -0700 (PDT) Reply-To: rone@nas.nasa.gov X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm trying to compile GNU Privacy Guard (a free replacement for PGP ) 0.3.5 on my FreeBSD 2.2.7-stable box. It fails here: B1FF:rone /home/rone/gnupg-0.3.5/g10 195 > make gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../intl -I../intl -g -Wall -c status.c status.c: In function `init_shm_coprocessing': status.c:145: `SHM_LOCK' undeclared (first use this function) status.c:145: (Each undeclared identifier is reported only once status.c:145: for each function it appears in.) *** Error code 1 The code in question: if( lock_mem ) { if ( shmctl (shm_id, SHM_LOCK, 0) ) log_info("Locking shared memory %d failed: %s\n", shm_id, strerror(errno)); else shm_is_locked = 1; } I sent the GPG author the part of /usr/src/sys/kern/sysv_shm.c which contains: #if 0 case SHM_LOCK: case SHM_UNLOCK: #endif He emailed me and asked: Is it possible for you to check whether it works if you mlock() the shared memory later (see util/secmem.c how to do this). I don't have a clue what he means. I am hoping someone here can help me. >From gnupg-0.3.5/util/secmem.c: static void lock_pool( void *p, size_t n ) { #ifdef HAVE_MLOCK uid_t uid; int err; err = mlock( p, n ); if( err && errno ) err = errno; uid = getuid(); if( uid && !geteuid() ) { if( setuid( uid ) ) log_fatal("failed to reset uid: %s\n", strerror(errno)); } if( err ) { if( errno != EPERM #ifdef EAGAIN /* OpenBSD returns this */ && errno != EAGAIN #endif ) log_error("canīt lock memory: %s\n", strerror(err)); show_warning = 1; } #else log_info("Please note that you don't have secure memory on this system\n"); #endif } If anyone can give me a hand with this, i will greatly appreciate it. Please be sure to email me a copy of your response as i'm not subscribed to -questions (yeah, i know, how lame). thanks rone -- Ron Echeverri Numerical Aerodynamic Simulation Facility DSS/Usenet Administrator NASA Ames Research Center Internet Sysop Mountain View, CA x42771 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message