Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stone <michael@laptop.org>2009-12-06 00:48:47 (GMT)
committer Michael Stone <michael@laptop.org>2009-12-06 00:48:47 (GMT)
commit23f51f3ef972ad631b6c637daab5ed3e6a51b330 (patch)
treebf897917a9e74dfbe446292c5f32168cd115eb06
parentffd4bc469644caf8a28cd9244cd71c1f69ad93b3 (diff)
Clean up group membership.
-rwxr-xr-xrainbow/bin/rainbow-gc5
1 files changed, 5 insertions, 0 deletions
diff --git a/rainbow/bin/rainbow-gc b/rainbow/bin/rainbow-gc
index 22e9e3e..24f2063 100755
--- a/rainbow/bin/rainbow-gc
+++ b/rainbow/bin/rainbow-gc
@@ -6,6 +6,7 @@ from subprocess import call, check_call, CalledProcessError
from os import listdir, unlink
from os.path import join, isdir, islink, exists
from optparse import OptionParser
+from glob import glob
from rainbow.util import trace, make_reporter
@@ -42,6 +43,10 @@ def gc_uid(spool, uid):
# NB: it is important that rm -rf doesn't follow links. <MS>
check_call(['/bin/rm', '-r', '-f', row])
+ for row in glob(join(spool, 'gid_to_members', '*', uid)):
+ # NB: it is important that rm -rf doesn't follow links. <MS>
+ check_call(['/bin/rm', '-r', '-f', row])
+
# So long as we unlink the reservation last, we run no risk of seeing inconsistency
unlink(reservation)