458 |
"trigger further warnings" % (name,), 2) |
"trigger further warnings" % (name,), 2) |
459 |
dropped_acl_names[name] = name |
dropped_acl_names[name] = name |
460 |
|
|
|
def map_id_name(owner_pair, group = None): |
|
|
"""Return id of mapped id and user given original owner_pair""" |
|
|
id, name = owner_pair |
|
|
Map = group and user_group.GroupMap or user_group.UserMap |
|
|
if name: return Map.get_id_from_name(name) |
|
|
else: |
|
|
assert id is not None |
|
|
return Map.get_id_from_id(id) |
|
|
|
|
461 |
acl = posix1e.ACL() |
acl = posix1e.ACL() |
462 |
for typechar, owner_pair, perms in entry_list: |
for typechar, owner_pair, perms in entry_list: |
463 |
id = None |
id = None |
464 |
if owner_pair: |
if owner_pair: |
465 |
if map_names: |
if map_names: |
466 |
if typechar == "u": id = map_id_name(owner_pair, 0) |
if typechar == "u": id = user_group.acl_user_map(*owner_pair) |
467 |
else: |
else: |
468 |
assert typechar == "g", (typechar, owner_pair, perms) |
assert typechar == "g", (typechar, owner_pair, perms) |
469 |
id = map_id_name(owner_pair, 1) |
id = user_group.acl_group_map(*owner_pair) |
470 |
if id is None: |
if id is None: |
471 |
warn_drop(owner_pair[1]) |
warn_drop(owner_pair[1]) |
472 |
continue |
continue |