[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Bug in SVN::Client

From: John Peacock <jpeacock_at_rowman.com>
Date: 2006-12-13 23:04:21 CET

John Peacock wrote:
> Attached is a script which needs to be run like this:

Duh. This time with the script attached... :(

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

#!/usr/bin/perl -w
use POSIX qw(:sys_wait_h :errno_h :signal_h);
use SVN::Client;
use Data::Dumper qw/Dumper/;

my $USER = $ENV{SUDO_USER};

# Drop privileges
my (undef, undef, $quid, $qgid) = getpwnam $USER or
    die "unable to determine uid/gid for $USER\n";

my $groups = "$qgid $qgid";
while (my ($name,$passwd,$gid,$members) = getgrent()) {
    my @m = split(/ /, $members);
    if (grep {$_ eq $USER} @m) {
        $groups .= " $gid";
    }
}
$) = $groups;
POSIX::setgid($qgid) or
    die "unable to change gid: $!\n";
POSIX::setuid($quid) or
    die "unable to change uid: $!\n";
$> = $quid;

my $client = SVN::Client->new();

print Dumper($client);

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 13 23:04:19 2006

This is an archived mail posted to the Subversion Dev mailing list.