#!/usr/bin/perl

use lib qw(/usr/lib/libDrakX);

use standalone;     #- warning, standalone must be loaded very first, for 'explanations'

use common;
use interactive;
use security::level;
use authentication;
use any;

my $users = []; 
my $in;

if (my @l = grep { ! /^-/ } @ARGV) {
    $users = [ map { { name => $_, realname => $_ } } @l ];
} else {
    $in = 'interactive'->vnew('su');
    any::ask_user($in, $users, security::level::get(), needauser => 1);
}

any::add_users($users, authentication::get());

$in->exit(0) if $in;