• Home
  • Raw
  • Download

Lines Matching refs:user

31 def get_user_hash(user):  argument
34 '--user=%s' % user])
37 def user_path(user): argument
39 return utils.system_output(['cryptohome-path', 'user', user])
42 def system_path(user): argument
44 return utils.system_output(['cryptohome-path', 'system', user])
47 def temporary_mount_path(user): argument
52 return TEMP_MOUNT_PATTERN % (get_user_hash(user))
55 def vault_path(user): argument
60 return VAULT_PATH_PATTERN % (get_user_hash(user))
63 def ensure_clean_cryptohome_for(user, password=None): argument
71 unmount_vault(user)
72 remove_vault(user)
73 mount_vault(user, password, create=True)
267 def remove_vault(user): argument
269 logging.debug('user is %s', user)
270 user_hash = get_user_hash(user)
271 logging.debug('Removing vault for user %s with hash %s', user, user_hash)
272 cmd = CRYPTOHOME_CMD + ' --action=remove --force --user=%s' % user
291 def mount_vault(user, password, create=False, key_label=None): argument
297 args = [CRYPTOHOME_CMD, '--action=mount_ex', '--user=%s' % user,
307 user_hash = get_user_hash(user)
317 user_hash = get_user_hash(user)
324 if not is_permanent_vault_mounted(user=user, allow_fail=True):
337 def test_auth(user, password): argument
338 cmd = [CRYPTOHOME_CMD, '--action=check_key_ex', '--user=%s' % user,
345 def add_le_key(user, password, new_password, new_key_label): argument
347 '--user=%s' % user, '--password=%s' % password,
353 def remove_key(user, password, remove_key_label): argument
354 args = [CRYPTOHOME_CMD, '--action=remove_key_ex', '--user=%s' % user,
372 def unmount_vault(user=None): argument
380 if user is not None and is_vault_mounted(user, allow_fail=True):
401 def __get_user_mount_info(user, allow_fail=False): argument
409 return [__get_mount_info(mount_point=user_path(user),
411 __get_mount_info(mount_point=system_path(user),
414 def is_vault_mounted(user, regexes=None, allow_fail=False): argument
431 user_mount_info = __get_user_mount_info(user=user, allow_fail=allow_fail)
479 user=GUEST_USER_NAME,
490 def is_permanent_vault_mounted(user, allow_fail=False): argument
493 user=user,
502 def get_mounted_vault_path(user, allow_fail=False): argument
504 return os.path.join(constants.SHADOW_ROOT, get_user_hash(user), 'mount')
548 def create_ecryptfs_homedir(user, password): argument
557 unmount_vault(user)
558 remove_vault(user)
562 '--user=%s' % user,
568 if not is_vault_mounted(user, regexes={
575 def do_dircrypto_migration(user, password, timeout=600): argument
583 unmount_vault(user)
588 '--user=%s' % user,
591 if not __get_mount_info(temporary_mount_path(user), allow_fail=True):
593 args = [CRYPTOHOME_CMD, '--action=migrate_to_dircrypto', '--user=%s' % user]
597 temporary_mount_path(user), allow_fail=True),
603 def change_password(user, password, new_password): argument
607 '--user=%s' % user,
708 def mount(self, user, password, create=False, async=True, key_label='bar'): argument
716 acc.account_id = user
733 def unmount(self, user): argument
748 def is_mounted(self, user): argument
750 return (utils.is_mountpoint(user_path(user))
751 and utils.is_mountpoint(system_path(user)))
754 def require_mounted(self, user): argument
756 utils.require_mountpoint(user_path(user))
757 utils.require_mountpoint(system_path(user))
760 def remove(self, user, async=True): argument
768 acc.account_id = user
776 def ensure_clean_cryptohome_for(self, user, password=None): argument
784 self.remove(user)
785 self.mount(user, password, create=True)