in reply to Re: [SOLVED] Configuring Apache VirtualHosts using mod_perl 2
in thread [SOLVED] Configuring Apache VirtualHosts using mod_perl 2
I agree in principle, although it's not really related to configuring VirtualHosts so it would probably deserve to be discussed in a node of its own.
...By someone considerably more skilled than myself :-/
I worked around the problem by scanning the passwd/group files manually. Not at all portable ofcourse, but that's no particular concern of mine.
my %users = (); my %groups = (); my $pfname = '/etc/passwd'; open(my $pfh, $pfname) || warn "Error reading $pfname: $!"; while (my $line = <$pfh>) { my ($name) = split(/:/, $line); $users{$name} = 1; } close $pfh; my $gfname = '/etc/group'; open(my $gfh, $gfname) || warn "Error reading $gfname: $!"; while (my $line = <$gfh>) { my ($name) = split(/:/, $line); $groups{$name} = 1; } close $gfh;
Time flies when you don't know what you're doing
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: [SOLVED] Configuring Apache VirtualHosts using mod_perl 2
by Anonymous Monk on Dec 02, 2014 at 23:26 UTC | |
by FloydATC (Deacon) on Dec 03, 2014 at 14:17 UTC | |
by Anonymous Monk on Dec 03, 2014 at 20:22 UTC | |
by FloydATC (Deacon) on Dec 04, 2014 at 07:17 UTC | |
by Anonymous Monk on Dec 04, 2014 at 08:40 UTC | |
| |
by FloydATC (Deacon) on Dec 04, 2014 at 07:15 UTC |