From: Jim Rees <rees@umich.edu>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: librpcsecgss: FTBFS on GNU/kFreeBSD
Date: Sun, 24 Nov 2013 08:07:53 -0500 [thread overview]
Message-ID: <20131124130753.GA15178@umich.edu> (raw)
In-Reply-To: <20131124090924.GA29659@infradead.org>
Christoph Hellwig wrote:
On Sun, Nov 24, 2013 at 04:19:04PM +1100, An?bal Monsalve Salazar wrote:
> (void)gettimeofday(&now, (struct timezone *)0);
> -#ifdef __linux__
> +#if defined (__linux__) || defined(__GLIBC__)
> call_msg.rm_xid = getpid() ^ now.tv_sec ^ now.tv_usec;
> #else
> call_msg.rm_xid = arc4random();
Using getpid() instead of a random generator seems fairly dangerous.
Why don't we use a real RNG/PRNG here?
Maybe we're just trying to avoid collisions, and don't care if someone can
guess xids? But either way, agreed. Also, shouldn't the existence of
arc4random() be determined by configure? Isn't that why we use configure, so
we don't need fragile ifdefs in the code?
Is anyone maintaining this library?
next prev parent reply other threads:[~2013-11-24 13:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090703133142.14887.33854.reportbug@localhost.localdomain>
2013-11-24 5:19 ` librpcsecgss: FTBFS on GNU/kFreeBSD Aníbal Monsalve Salazar
2013-11-24 9:09 ` Christoph Hellwig
2013-11-24 13:07 ` Jim Rees [this message]
2013-11-24 13:29 ` Christoph Hellwig
2013-12-04 13:13 ` Christoph Hellwig
2013-12-04 17:14 ` Chuck Lever
2013-12-04 17:53 ` Trond Myklebust
2013-12-04 18:14 ` Chuck Lever
2013-12-05 13:23 ` Christoph Hellwig
2013-12-05 13:41 ` Trond Myklebust
2013-12-05 13:43 ` Christoph Hellwig
2013-12-05 13:45 ` Trond Myklebust
2013-12-05 16:37 ` Steve Dickson
2013-12-10 6:27 ` NeilBrown
2013-12-05 16:15 ` Jim Rees
2013-12-04 18:24 ` J. Bruce Fields
2013-12-04 18:27 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131124130753.GA15178@umich.edu \
--to=rees@umich.edu \
--cc=hch@infradead.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).