2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Treat netgroup entries differently

This commit is contained in:
Jarrod Johnson 2021-09-01 11:00:53 -04:00
parent 27a1649d94
commit a7d894007f

View File

@ -134,7 +134,9 @@ class CredMerger:
else:
self.discardnames[name] = 1
else:
if uid >= minid and uid <= maxid:
if name[0] in ('+', '#', '@'):
self.sourcedata.append(line)
elif uid >= minid and uid <= maxid:
self.sourcedata.append(line)
def read_shadow(self, source):
@ -167,6 +169,8 @@ class CredMerger:
shadout.write(line + '\n')
for line in self.sourcedata:
name, _ = line.split(':', 1)
if name[0] in ('+', '#', '@'):
continue
if name in self.shadowednames:
continue
shadout.write(name + ':!:::::::\n')
@ -216,4 +220,4 @@ def synchronize():
if __name__ == '__main__':
synchronize()
synchronize()