Commit ef9ff2a9 authored by Mike Hibler's avatar Mike Hibler

When removing a user from a project, be sure to set the update_accounts

bit in the DB so that their homedir will be unmounted and account destroyed
on all nodes in that project.
parent 644939d2
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2007 University of Utah and the Flux Group. # Copyright (c) 2000-2008 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
use strict; use strict;
...@@ -226,8 +226,17 @@ if (defined($project)) { ...@@ -226,8 +226,17 @@ if (defined($project)) {
# #
$EUID = $UID; $EUID = $UID;
system("$MODGROUPS -r $pid:$pid $target_uid"); system("$MODGROUPS -r $pid:$pid $target_uid");
my $estatus = ($? >> 8);
exit($? >> 8) #
# Update all nodes in the project so that account will be removed
# and homedir unmounted.
#
if (!$estatus) {
TBNodeUpdateAccountsByPid($pid)
}
exit($estatus)
if (!$nuke); if (!$nuke);
$EUID = 0; $EUID = 0;
...@@ -270,7 +279,7 @@ $target_user->Purge() == 0 ...@@ -270,7 +279,7 @@ $target_user->Purge() == 0
or fatal("Could not purge $target_user from the DB!"); or fatal("Could not purge $target_user from the DB!");
# #
# Remove user acount from both local and control node. No need to do this in # Remove user account from both local and control node. No need to do this in
# nukemode (not allowed anyway) since the account never existed. # nukemode (not allowed anyway) since the account never existed.
# #
if (! $nuke) { if (! $nuke) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment