Changeset 1822 for trunk


Ignore:
Timestamp:
Apr 29, 2011, 9:14:59 PM (13 years ago)
Author:
andersk
Message:
ldapize: Support HOME=lockerroot/Scripts

This doesn’t change anything for existing users, but will let future
users with HOME=lockerroot/Scripts serve Git repositories out of
lockerroot/Scripts/git and so on.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/common/oursrc/execsys/ldapize.pl

    r1821 r1822  
    4040my ($homeDirectory, $uidNumber, $gidNumber) =
    4141    map { $userEntry->get_value($_) } qw(homeDirectory uidNumber gidNumber);
     42(my $scriptsdir = $homeDirectory) =~ s{(?:/Scripts)?$}{/Scripts};
    4243
    4344if ($proto eq 'svn') {
    4445  chdir '/usr/libexec/scripts-trusted';
    45   exec('/usr/sbin/suexec', $uidNumber, $gidNumber, '/usr/libexec/scripts-trusted/svn', "$homeDirectory/Scripts/svn/$vhostDirectory");
     46  exec('/usr/sbin/suexec', $uidNumber, $gidNumber, '/usr/libexec/scripts-trusted/svn', "$scriptsdir/svn/$vhostDirectory");
    4647} elsif ($proto eq 'git') {
    4748  chdir '/usr/libexec/scripts-trusted';
    48   exec('/usr/sbin/suexec', $uidNumber, $gidNumber, '/usr/libexec/scripts-trusted/git', "$homeDirectory/Scripts/git/$vhostDirectory");
     49  exec('/usr/sbin/suexec', $uidNumber, $gidNumber, '/usr/libexec/scripts-trusted/git', "$scriptsdir/git/$vhostDirectory");
    4950} elsif ($proto eq 'http') {
    50   print "suexec $uidNumber $gidNumber $homeDirectory/Scripts/web/$vhostDirectory/$path\n";
     51  print "suexec $uidNumber $gidNumber $scriptsdir/web/$vhostDirectory/$path\n";
    5152} else {
    5253  die "Unknown protocol\n";
Note: See TracChangeset for help on using the changeset viewer.