[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gnupg compiled

On Fri, Jan 07, 2000 at 10:53:13PM +0100, Daniel Wagner wrote:
> Hi,
> I managed to compile gnupg under Hurd. Well, it was quite easy... :) Just
> one problem: gnupg wants to disable core dumping and uses getrlimit and
> setrlimit for this. Unfortunately setrlimit is not implemented in glibc0.2.

Ah yes. The Hurd does not support core dumping anyway currently, so don't

> One possible way is to disable this function temporarily by a "#ifndef" condition
> until the function is implemented. The other way is to implement it, but I 
> guess this is rather huge task and I don't know how.

Indeed :)
> BTW gnupg think Hurd is not secure enough:
> gauss:/usr/src/gnupg-1.0.1/g10# ./gpg
> gpg: WARNING: program may create a core file!
> gpg: Please note that you don't have secure memory on this system
> gpg: Go ahead and type your message ...

Well, gpg seems to be pretty optimistic about the Hurd ;)

Well, here is what I did in exim, and you should do similar for GPG:

  if (setrlimit(RLIMIT_CORE, &rl) < 0)
    #ifdef __GNU__
    if (errno != ENOSYS && errno != ENOTSUP)
      log_write(0, LOG_MAIN|LOG_PANIC, "setrlimit failed: %s", strerror(errno));

Of course, instead log_write(), you spit out something different, like the
warninng above. What ever GPG does in the error case.

This way, when rlimit is supported in the Hurd one day, the feature will
magically start to work in GPG, too.

It is important to ignore the failing setrlimit if and only if errno is


`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server 
Marcus Brinkmann              GNU    http://www.gnu.org    for public PGP Key 
Marcus.Brinkmann@ruhr-uni-bochum.de,     marcus@gnu.org    PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       brinkmd@debian.org

Reply to: