Lines Matching refs:guard

103         let mut guard = GLOBAL_FILE.lock().unwrap();  in write_group_file()  localVariable
104 let content = read_to_string(&guard.group_file); in write_group_file()
122 guard.group_file.set_len(0).unwrap(); in write_group_file()
123 guard.group_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in write_group_file()
124 guard.group_file.write_all(new_content.as_bytes()).unwrap(); in write_group_file()
125 guard.group_file.flush().unwrap(); in write_group_file()
145 let mut guard = GLOBAL_FILE.lock().unwrap(); in write_gshadow_file() localVariable
146 let content = read_to_string(&guard.gshadow_file); in write_gshadow_file()
163 guard.gshadow_file.set_len(0).unwrap(); in write_gshadow_file()
164 guard in write_gshadow_file()
168 guard in write_gshadow_file()
172 guard.gshadow_file.flush().unwrap(); in write_gshadow_file()
198 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_passwd_file() localVariable
199 let content = read_to_string(&guard.passwd_file); in update_passwd_file()
210 guard.passwd_file.set_len(0).unwrap(); in update_passwd_file()
211 guard.passwd_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_passwd_file()
212 guard.passwd_file.write_all(new_content.as_bytes()).unwrap(); in update_passwd_file()
213 guard.passwd_file.flush().unwrap(); in update_passwd_file()
218 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_group_file() localVariable
219 let content = read_to_string(&guard.group_file); in update_group_file()
239 guard.group_file.set_len(0).unwrap(); in update_group_file()
240 guard.group_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_group_file()
241 guard.group_file.write_all(new_content.as_bytes()).unwrap(); in update_group_file()
242 guard.group_file.flush().unwrap(); in update_group_file()
248 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_shadow_file() localVariable
249 let content = read_to_string(&guard.shadow_file); in update_shadow_file()
257 guard.shadow_file.set_len(0).unwrap(); in update_shadow_file()
258 guard.shadow_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_shadow_file()
259 guard.shadow_file.write_all(new_content.as_bytes()).unwrap(); in update_shadow_file()
260 guard.shadow_file.flush().unwrap(); in update_shadow_file()
265 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_gshadow_file() localVariable
266 let content = read_to_string(&guard.gshadow_file); in update_gshadow_file()
286 guard.gshadow_file.set_len(0).unwrap(); in update_gshadow_file()
287 guard in update_gshadow_file()
291 guard in update_gshadow_file()
295 guard.gshadow_file.flush().unwrap(); in update_gshadow_file()
329 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_passwd_file() localVariable
330 let content = read_to_string(&guard.passwd_file); in update_passwd_file()
357 guard.passwd_file.set_len(0).unwrap(); in update_passwd_file()
358 guard.passwd_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_passwd_file()
359 guard.passwd_file.write_all(new_content.as_bytes()).unwrap(); in update_passwd_file()
360 guard.passwd_file.flush().unwrap(); in update_passwd_file()
371 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_group_file() localVariable
372 let content = read_to_string(&guard.group_file); in update_group_file()
405 guard.group_file.set_len(0).unwrap(); in update_group_file()
406 guard.group_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_group_file()
407 guard.group_file.write_all(new_content.as_bytes()).unwrap(); in update_group_file()
408 guard.group_file.flush().unwrap(); in update_group_file()
415 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_shadow_file() localVariable
416 let content = read_to_string(&guard.shadow_file); in update_shadow_file()
427 guard.shadow_file.set_len(0).unwrap(); in update_shadow_file()
428 guard.shadow_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_shadow_file()
429 guard.shadow_file.write_all(new_content.as_bytes()).unwrap(); in update_shadow_file()
430 guard.shadow_file.flush().unwrap(); in update_shadow_file()
441 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_gshadow_file() localVariable
442 let content = read_to_string(&guard.gshadow_file); in update_gshadow_file()
478 guard.gshadow_file.set_len(0).unwrap(); in update_gshadow_file()
479 guard in update_gshadow_file()
483 guard in update_gshadow_file()
487 guard.gshadow_file.flush().unwrap(); in update_gshadow_file()
507 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_passwd_file() localVariable
508 let content = read_to_string(&guard.passwd_file); in update_passwd_file()
521 guard.passwd_file.set_len(0).unwrap(); in update_passwd_file()
522 guard.passwd_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_passwd_file()
523 guard.passwd_file.write_all(new_content.as_bytes()).unwrap(); in update_passwd_file()
524 guard.passwd_file.flush().unwrap(); in update_passwd_file()
530 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_shadow_file() localVariable
531 let content = read_to_string(&guard.shadow_file); in update_shadow_file()
540 guard.shadow_file.set_len(0).unwrap(); in update_shadow_file()
541 guard.shadow_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_shadow_file()
542 guard.shadow_file.write_all(new_content.as_bytes()).unwrap(); in update_shadow_file()
543 guard.shadow_file.flush().unwrap(); in update_shadow_file()
597 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_group_file() localVariable
598 let content = read_to_string(&guard.group_file); in update_group_file()
606 guard.group_file.set_len(0).unwrap(); in update_group_file()
607 guard.group_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_group_file()
608 guard.group_file.write_all(new_content.as_bytes()).unwrap(); in update_group_file()
609 guard.group_file.flush().unwrap(); in update_group_file()
615 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_gshadow_file() localVariable
616 let content = read_to_string(&guard.gshadow_file); in update_gshadow_file()
624 guard.gshadow_file.set_len(0).unwrap(); in update_gshadow_file()
625 guard in update_gshadow_file()
629 guard in update_gshadow_file()
633 guard.gshadow_file.flush().unwrap(); in update_gshadow_file()
654 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_group_file() localVariable
655 let content = read_to_string(&guard.group_file); in update_group_file()
669 guard.group_file.set_len(0).unwrap(); in update_group_file()
670 guard.group_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_group_file()
671 guard.group_file.write_all(new_content.as_bytes()).unwrap(); in update_group_file()
672 guard.group_file.flush().unwrap(); in update_group_file()
678 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_gshadow_file() localVariable
679 let content = read_to_string(&guard.gshadow_file); in update_gshadow_file()
690 guard.gshadow_file.set_len(0).unwrap(); in update_gshadow_file()
691 guard in update_gshadow_file()
695 guard in update_gshadow_file()
699 guard.gshadow_file.flush().unwrap(); in update_gshadow_file()
705 let mut guard = GLOBAL_FILE.lock().unwrap(); in update_passwd_file() localVariable
706 let content = read_to_string(&guard.passwd_file); in update_passwd_file()
717 guard.passwd_file.set_len(0).unwrap(); in update_passwd_file()
718 guard.passwd_file.seek(std::io::SeekFrom::Start(0)).unwrap(); in update_passwd_file()
719 guard.passwd_file.write_all(new_content.as_bytes()).unwrap(); in update_passwd_file()
720 guard.passwd_file.flush().unwrap(); in update_passwd_file()