|
Lines 686-691
Link Here
|
| 686 |
if not iuser: |
686 |
if not iuser: |
| 687 |
continue # not a users/user object |
687 |
continue # not a users/user object |
| 688 |
logger.info("user has been replicated: %r", idn) |
688 |
logger.info("user has been replicated: %r", idn) |
|
|
689 |
|
| 690 |
# Bug #52307: |
| 691 |
# Creating two exams quickly in succession leads to the |
| 692 |
# second exam mode using the same UIDs as the first. |
| 693 |
# -> clear user name cache to force Samba to get the |
| 694 |
# new UID from ldap. |
| 695 |
logger.info("Clear user name cache...") |
| 696 |
cmd = ["/usr/sbin/nscd", "-i", "passwd"] |
| 697 |
if subprocess.call(cmd): |
| 698 |
logger.error("Clearing user name cache failed: %s", " ".join(cmd)) |
| 699 |
else: |
| 700 |
logger.info("Clearing user name cache finished successfully.") |
| 701 |
|
| 689 |
# call hook scripts |
702 |
# call hook scripts |
| 690 |
if 0 != subprocess.call( |
703 |
if 0 != subprocess.call( |
| 691 |
[ |
704 |
[ |
|
Lines 1015-1032
Link Here
|
| 1015 |
# indicate the user has been processed |
1028 |
# indicate the user has been processed |
| 1016 |
progress.add_steps(percentPerUser) |
1029 |
progress.add_steps(percentPerUser) |
| 1017 |
|
1030 |
|
| 1018 |
# Bug #52307: |
|
|
| 1019 |
# Creating two exams quickly in succession leads to the |
| 1020 |
# second exam mode using the same UIDs as the first. |
| 1021 |
# -> clear user name cache to force Samba to get the |
| 1022 |
# new UID from ldap. |
| 1023 |
logger.info("Clear user name cache...") |
| 1024 |
cmd = ["/usr/sbin/nscd", "-i", "passwd"] |
| 1025 |
if subprocess.call(cmd): |
| 1026 |
logger.error("Clearing user name cache failed: %s", " ".join(cmd)) |
| 1027 |
else: |
| 1028 |
logger.info("Clearing user name cache finished successfully.") |
| 1029 |
|
| 1030 |
logger.info("Finished removing exam accounts.") |
1031 |
logger.info("Finished removing exam accounts.") |
| 1031 |
progress.add_steps(percentPerUser) |
1032 |
progress.add_steps(percentPerUser) |
| 1032 |
|
1033 |
|