All of lore.kernel.org
 help / color / mirror / Atom feed
* Ideas on NSS vs fork?
@ 2011-04-28 21:29 Tommi Virtanen
  2011-04-29  6:02 ` Colin Patrick McCabe
  0 siblings, 1 reply; 5+ messages in thread
From: Tommi Virtanen @ 2011-04-28 21:29 UTC (permalink / raw)
  To: ceph-devel

NSS, the crypto library Red Hat likes to use, cannot tolerate
forks. NSS_NoDB_Init must be called after daemonization, and there
seems to be no way around it; for example, calling it again is
explicitly forbidden.

The code in branch wip-nss-vs-fork adds a common_init_daemonized
function, that things that (potentially) daemonize must call, after
the point where they'd daemonize. Non-daemons are handled in
common_preinit and need nothing special.

Users of libceph/librados cannot fork, and expect to keep using the
library :(

The "remove this" comment on libceph_initialized cannot be blindly
acted on; similar logic could be pushed down into ceph::crypto::init,
though.

This is ugly, but it's the best I could do. Please go through the code
and let me know if you have any ideas on how to make it less painful.

In the meanwhile, if you need NSS to work, you can always run in
non-daemonizing mode, with -f.


P.S. Please use Crypto++. For my sanity.

-- 
:(){ :|:&};:

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-04-29 16:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-28 21:29 Ideas on NSS vs fork? Tommi Virtanen
2011-04-29  6:02 ` Colin Patrick McCabe
2011-04-29 15:49   ` Sage Weil
2011-04-29 16:14   ` Tommi Virtanen
2011-04-29 16:15     ` Tommi Virtanen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.