Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
raise FUSEError(errno.ENOTTY)
elif name == b'lock':
try:
id_ = parse_literal(value, int)
except ValueError:
log.warning('Received malformed command via control inode')
raise FUSEError.EINVAL()
await self.lock_tree(id_)
elif name == b'rmtree':
try:
tup = parse_literal(value, (int, bytes))
except ValueError:
log.warning('Received malformed command via control inode')
raise FUSEError.EINVAL()
await self.remove_tree(*tup)
elif name == b'logging':
try:
(lvl, modules)= parse_literal(value, (int, str))
except (ValueError, KeyError):
log.warning('Received malformed command via control inode')
raise FUSEError.EINVAL()
update_logging(lvl, modules.split(',') if modules else None)
elif name == b'cachesize':
try:
self.cache.cache.max_size = parse_literal(value, int)
except ValueError:
log.warning('Received malformed command via control inode')
raise FUSEError.EINVAL()