+
+def _authenticate(cell):
+ """Acquire credentials if possible for a particular cell.
+
+ This function returns True if an authenticated connection to the
+ cell should be established; False otherwise.
+
+ If a cell isn't explicitly listed in the configuration file,
+ _authenticate will assume that it /should/ authenticate to the
+ cell.
+
+ The assumption is that choosing to authenticate to a cell will
+ fail in two cases: (a) the cell authenticates against the
+ machine's home realm and there is no PTS ID in the cell, or (b)
+ the cell doesn't authenticate against the machine's home realm and
+ doesn't have cross-realm authentication setup.
+
+ In the former case, it should be possible for the sysadmins to
+ list all cells that authenticate against the home realm (including
+ those where attempting authentication would be problematic). In
+ the latter case, such a cell would be at best distantly connected
+ to the home cell, and we probably don't want to give it quota
+ anyway.
+ """
+ for c in config.authz.cells:
+ if c.cell == cell and not c.auth:
+ return False
+
+ remctl.checkKinit()
+ common.captureOutput(['aklog', '-c', cell])
+ return True
+
+
+def _expandGroup(name, cell=None, auth=False):