Esempio n. 1
0
def _acl_compare_rps(rp1, rp2):
    """Return true if rp1 and rp2 have same acl information."""
    acl1 = eas_acls.AccessControlLists(rp1.index)
    acl1.read_from_rp(rp1)
    acl2 = eas_acls.AccessControlLists(rp2.index)
    acl2.read_from_rp(rp2)
    return acl1 == acl2
Esempio n. 2
0
def get_meta_object(*params):
    """
    Returns a Metadata object as corresponds to the current type

    Necessary to guarantee compatibility between rdiff-backup 2.0 and 2.1+
    """
    if Globals.get_api_version() < 201:  # compat200
        from rdiff_backup import eas_acls
        return eas_acls.AccessControlLists(*params)
    else:
        return AccessControlLists(*params)