4:64
      ˆÂ‘äÇò 8à_+ò86'¿ŸÁƒh¹À¿¾      7:64
      ˆÂ‘äÇò 8à_+ò8Z#ßÏÁƒh¹À¿¾      4:26
      ˆÂ‘äÇò 8à_+ò86'¿ŸÁƒh¹À¿¾      4:42
  5   	ˆl–äY>” ”¾R( 	Å ÍÆÁpN)‹Fÿ�þB gåz0JWZ{ùÂƒh¹ÁÀ¿      	4:12
  6   ˆl–äY>” ”¾R( 	Å ÍÆš¸ÓÊbÑ¿�þB gåuÉZn9KüÿÃƒh¹ÂÁÀ      4:66
      ˆÄ‘äÇò 8à_+ò8Óq¶çÃƒh¹ÂÁÀ      13:63
  @   ˆl—ß=¿J	µ4Ò‚ ™P-Üm«Œ¶¦-ÿ�þDÛ!Y¹Hóƒdq¢ùÄƒ}±Ã_ˆI|¥�+V[(ÃÂ %1    # Subroutines shared by the "adduser" and "deluser" utilities.
#
# Copyright (C) 2000 Roland Bauerschmidt <rb@debian.org>
#
# Most subroutines here are adopted from Debian's original "adduser"
# program.
#
# Copyright (C) 1997-1999 Guy Maor <maor@debian.org>
#
# Copyright (C) 1995 Ted Hajek <tedhajek@boombox.micro.umn.edu>
#                    Ian A. Murdock <imurdock@gnu.ai.mit.edu>


use File::Basename;
use Fcntl qw(:flock SEEK_END);

use constant PROGNAME => basename($0);

use vars qw(@EXPORT $VAR1);

my $lockfile;

@EXPORT = (
    'debugf',
    'dief',
    'get_group_members',
    'gtx',
    'read_config',
    'read_pool',
    's_print',
    's_printf',
    'systemcall',
    'systemcall_or_warn',
    'systemcall_silent',
    'warnf',
    'acquire_lock',
    'release_lock'
);

sub gtx {
    return gettext( shift );
}

sub dief {
    my ($form, @argu) = @_;
    printf STDERR sprintf(gtx('%s: %s'), PROGNAME, $form), @argu;
    exit 1;
}

sub warnf {
    my ($form, @argu) = @_;
    printf STDERR sprintf(gtx('%s: %s'), PROGNAME, $form), @argu;
}

sub debugf {
    my ($form, @argu) = @_;
    if ( $verbose == 2 ) {
        printf STDERR sprintf('DEBUG: %s: %s', PROGNAME, $form), @argu;
    }
}

# parse the configuration file
# parameters:
#  -- filename of the configuration file
#  -- a hash for the configuration data
sub read_config {
    my ($conf_file, $configref) = @_;
    my ($var, $lcvar, $val);

    if (! -f $conf_file) {
        warnf gtx("`%s' does not exist. Using defaults.\n"),$conf_file if $verbose;
        return;
    }

    open (CONF, $conf_file) || dief ("%s: `%s'\n",$conf_file,$!);
    while (<CONF>) {
        chomp;
        next if /^#/ || /^\s*$/;

        if ((($var, $val) = m/^\s*([_a-zA-Z0-9]+)\s*=\s*(.*)/) != 2) {
            warnf gtx("Couldn't parse `%s', line %d.\n"),$conf_file,$.;
            next;
        }
        $lcvar = lc $var;
        if (!exists($configref->{$lcvar})) {
            warnf gtx("Unknown variable `%s' at `%s', line %d.\n"),$var,$conf_file,$.;
            next;
        }

        $val =~ s/^"(.*)"$/$1/;
        $val =~ s/^'(.*)'$/$1/;

        $configref->{$lcvar} = $val;
    }

    close CONF || die "$!";
}

# read names and IDs from a pool file
# parameters:
#  -- filename of the pool file, or directory containing files
#  -- a hash for the pool data
sub read_pool {
    my ($pool_file, $type, $poolref) = @_;
    my ($name, $id);
    my %ids = ();
    my %new;

    if (-d $pool_file) {
        opendir (DIR, $pool_file) or
            dief gtx("Cannot read directory `%s'"),$pool_file;
        my @files = readdir (DIR);
        closedir (DIR);
        foreach (sort @files) {
            next if (/^\./);
            next if (!/\.conf$/);
            my $file = "$pool_file/$_";
            next if (! -f $file);
            read_pool ($file, $type, $poolref);
        }
        return;
    }
    if (! -f $pool_file) {
        warnf gtx("`%s' does not exist.\n"),$pool_file if $verbose;
        return;
    }
    open (POOL, $pool_file) || dief ("%s: `%s'\n",$pool_file,$!);
    while (<POOL>) {
        chomp;
        next if /^#/ || /^\s*$/;

        if ($type eq "uid") {
            ($name, $id, $comment, $home, $shell) = split (/:/);
            if (!$name || $name !~ /^([_a-zA-Z0-9-]+)$/ ||
                !$id || $id !~ /^(\d+)$/) {
                warnf gtx("Couldn't parse `%s', line %d.\n"),$pool_file,$.;
                next;
            }
            $new = {
                'id' => $id,
                'comment' => $comment,
                'home' => $home,
                'shell' => $shell
            };
        } elsif ($t