Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Nov 2000 11:50:19 -0600
From:      mike.sellenschuetter@bankofamerica.com
To:        freebsd-security@FreeBSD.ORG
Subject:   rmuser
Message-ID:  <8625699E.0061FCDC.00@dalnsd40.bankofamerica.com>

next in thread | raw e-mail | index | archive | help


I apologize if this is not the right mailing list for this question.  We are
running a small system which contains around 50 servers and workstations running
FreeBSD 2.2.6 (we are upgrading to 4.1 after the Christmas holidays), and we
have discovered that rmuser is not removing a user's at jobs.  After removing a
user with rmuser, atq still shows the job in the queue, but with "???" as the
owner.  I looked at the rmuser Perl script, and below is the "remove_at_jobs"
subroutine from this script.

sub remove_at_jobs {
    local($login_name, $uid) = @_;
    local($i, $owner, $found);

    $found = 0;
    opendir(ATDIR, $atjob_dir) || return;
    while ($i = readdir(ATDIR)) {
    next if $i eq '.';
    next if $i eq '..';
    next if $i eq '.lockfile';

    $owner = (stat("$atjob_dir/$i"))[4]; # UID
    if ($uid == $owner) {
        if (!$found) {
        print STDERR "Removing user's at jobs:";
        $found = 1;
        }
        # Use atrm to remove the job
        print STDERR " $i";
        system('/usr/bin/atrm', $i);
    }
    }
    closedir(ATDIR);
    if ($found) {
    print STDERR " done.\n";
    }
}

The problem appears to be with the "system('/usr/bin/atrm', $i);" command.  $i
is a filename, and the atrm command wants a job number, not a file name.  Does
anyone know if this problem is fixed in 4.1?

Thank You
Mike




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8625699E.0061FCDC.00>