[#7978] Patch for Unix socket peer credentials — "James F. Hranicky" <jfh@...>

This patch adds support for getting the uid and gid of the peer

27 messages 2006/06/09
[#8004] Re: Patch for Unix socket peer credentials — Tanaka Akira <akr@...17n.org> 2006/06/16

In article <200606091528.30171.jfh@cise.ufl.edu>,

[#8005] Re: Patch for Unix socket peer credentials — "James F. Hranicky" <jfh@...> 2006/06/16

On Friday 16 June 2006 11:51, Tanaka Akira wrote:

[#8010] Re: Patch for Unix socket peer credentials — Tanaka Akira <akr@...17n.org> 2006/06/17

In article <200606161327.35948.jfh@cise.ufl.edu>,

[#8191] Re: Patch for Unix socket peer credentials — "James F. Hranicky" <jfh@...> 2006/07/10

On Saturday 17 June 2006 06:27, Tanaka Akira wrote:

[#8193] Re: Patch for Unix socket peer credentials — Tanaka Akira <akr@...> 2006/07/11

In article <200607101352.16804.jfh@cise.ufl.edu>,

[#8212] Re: Patch for Unix socket peer credentials — "James F. Hranicky" <jfh@...> 2006/07/13

On Tuesday 11 July 2006 00:10, Tanaka Akira wrote:

[#8217] Re: Patch for Unix socket peer credentials — nobu@... 2006/07/14

Hi,

[#8257] Re: Patch for Unix socket peer credentials — "James F. Hranicky" <jfh@...> 2006/07/18

On Thursday 13 July 2006 22:48, nobu@ruby-lang.org wrote:

[#8258] Re: Patch for Unix socket peer credentials — Eric Hodel <drbrain@...7.net> 2006/07/18

On Jul 18, 2006, at 12:27 PM, James F. Hranicky wrote:

[#8073] 1.8.5p1 build failure on Solaris 10 — "Daniel Berger" <Daniel.Berger@...>

Solaris 10

23 messages 2006/06/27
[#8074] Re: 1.8.5p1 build failure on Solaris 10 — Yukihiro Matsumoto <matz@...> 2006/06/28

Hi,

[#8078] Re: 1.8.5p1 build failure on Solaris 10 — "Daniel Berger" <Daniel.Berger@...> 2006/06/28

Yukihiro Matsumoto wrote:

[#8079] Re: 1.8.5p1 build failure on Solaris 10 — ts <decoux@...> 2006/06/28

>>>>> "D" == Daniel Berger <Daniel.Berger@qwest.com> writes:

[#8096] Re: 1.8.5p1 build failure on Solaris 10 — ville.mattila@... 2006/06/29

ts <decoux@moulon.inra.fr> wrote on 28.06.2006 17:37:00:

Re: loading rubygems at startup without RUBYOPT

From: nobu@...
Date: 2006-06-25 14:17:52 UTC
List: ruby-core #8055
Hi,

At Fri, 26 May 2006 14:48:55 +0900,
Nobuyoshi Nakada wrote in [ruby-core:07922]:
> By linking following extension library statically, rubygems.rb will be
> loaded even if no -rubygems option is in RUBYOPT nor command line.

This can achieve other hacks. 

E.g., adding vendor_ruby to $LOAD_PATH.

/* ext/vendor/vendor.c */
#include "ruby.h"

extern VALUE rb_load_path;

void
Init_vendor(void)
{
    static const char site[] = "/site_ruby";
    static const char vendor[] = "/vendor_ruby";
    VALUE vendors = 0;
    long i;

    for (i = 0; i < RARRAY(rb_load_path)->len; ++i) {
	VALUE path = RARRAY(rb_load_path)->ptr[i];
	const char *s = strstr(StringValuePtr(path), site), *e;
	long l;

	if (s && (!*(e = s + sizeof(site) - 1) || *e == '/')) {
	    VALUE newpath = rb_str_new(0, RSTRING(path)->len - sizeof(site) + sizeof(vendor));
	    char *p = RSTRING(newpath)->ptr;
	    memcpy(p, RSTRING(path)->ptr, l = p - RSTRING(path)->ptr);
	    memcpy(p += l, vendor, sizeof(vendor) - 1);
	    memcpy(p += sizeof(vendor) - 1, p + sizeof(site) - 1,
		   RSTRING(path)->len - l - sizeof(site));
	    if (!vendors) vendors = rb_ary_new();
	    rb_ary_push(vendors, newpath);
	}
	else if (vendors && RARRAY(vendors)->len > 0) {
	    rb_funcall(rb_load_path, rb_intern("[]="), 3, INT2FIX(i + 1), INT2FIX(0), vendors);
	    i += RARRAY(vendors)->len;
	    rb_ary_clear(vendors);
	}
    }
    if (vendors && RARRAY(vendors)->len > 0) {
	rb_ary_concat(rb_load_path, vendors);
    }
}

-- 
Nobu Nakada

In This Thread

Prev Next